Part Number Hot Search : 
54FCT 101G0001 CY7C4 101G0001 LTC1098I N3LLH 8731A LT8490
Product Description
Full Text Search
 

To Download PCA9665N Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1. general description the pca9665 serves as an interface between most standard parallel-bus microcontrollers/microprocessors and the serial i 2 c-bus and allows the parallel bus system to communicate bidirectionally with the i 2 c-bus. the pca9665 can operate as a master or a slave and can be a transmitter or receiver. communication with the i 2 c-bus is carried out on a byte or buffered mode using interrupt or polled handshake. the pca9665 controls all the i 2 c-bus speci?c sequences, protocol, arbitration and timing with no external timing element required. the pca9665 has the same footprint as the pca9564 with additional features: ? 1 mhz transmission speeds ? up to 25 ma drive capability on scl/sda ? 68-byte buffer ? i 2 c-bus general call ? software reset on the parallel bus 2. features n parallel-bus to i 2 c-bus protocol converter and interface n both master and slave functions n multi-master capability n internal oscillator trimmed to 15 % accuracy reduces external components n 1 mbit/s and up to 25 ma scl/sda i ol (fast-mode plus (fm+)) capability n i 2 c-bus general call capability n software reset on parallel bus n 68-byte data buffer n operating supply voltage: 2.3 v to 3.6 v n 5 v tolerant i/os n standard-mode and fast-mode i 2 c-bus capable and compatible with smbus n esd protection exceeds 2000 v hbm per jesd22-a114, 200 v mm per jesd22-a115, and 1000 v cdm per jesd22-c101 n latch-up testing is done to jedec standard jesd78 which exceeds 100 ma n packages offered: dip20, so20, tssop20, hvqfn20 pca9665 fm+ parallel bus to i 2 c-bus controller rev. 02 7 december 2006 product data sheet
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 2 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 3. applications n add i 2 c-bus port to controllers/processors that do not have one n add additional i 2 c-bus ports to controllers/processors that need multiple i 2 c-bus ports n converts 8 bits of parallel data to serial data stream to prevent having to run a large number of traces across the entire printed-circuit board 4. ordering information table 1. ordering information t amb = - 40 c to +85 c type number topside mark package name description version pca9665bs 9665 hvqfn20 plastic thermal enhanced very thin quad ?at package; no leads; 20 terminals; body 5 5 0.85 mm sot662-1 pca9665d pca9665d so20 plastic small outline package; 20 leads; body width 7.5 mm sot163-1 PCA9665N PCA9665N dip20 plastic dual in-line package; 20 leads (300 mil) sot146-1 pca9665pw pca9665 tssop20 plastic thin shrink small outline package; 20 leads; body width 4.4 mm sot360-1
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 3 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 5. block diagram fig 1. block diagram of pca9665 sd7 sd6 sd5 sd4 sd3 sd2 sd1 sd0 i2cdat C data register C read/write bus buffer sda control aa ensio sta sto si scl control ensio sta sto si filter pca9665 sda scl C C C C C ip2 ip1 ip0 indptr C indirect address pointer C write only st5 st4 st3 st2 st1 st0 0 0 i2csta C status register C read only aa ensio sta sto si mode i2ccon C control register C read/write clock selector oscillator control block ce wr rd int reset a1 a0 v dd a1 a0 01 00 00 11 interrupt control power-on reset d7 d6 d5 d4 d3 d2 d1 d0 data filter control signals 002aab023 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 indirect C indirect register access C read/write 10 direct registers ad7 ad6 ad5 ad4 ad3 ad2 ad1 gc i2cadr C own address C read/write l7 l6 l5 l4 l3 l2 l1 l0 i2cscll C scl low period C read/write h7 h6 h5 h4 h3 h2 h1 h0 i2csclh C scl high period C read/write te bit6 bit5 bit4 bit3 bit2 bit1 bit0 i2cto C timeout register C read/write indirect registers 00h 01h 02h 03h indptr lb bc6 bc5 bc2 bc1 bc0 i2ccount C byte count C read/write bc4 bc3 ir7 ir6 ir5 ir4 ir3 ir2 ir1 ir0 i2cpreset C software reset register C write only 04h 05h C C C ac0 i2cmode C i 2 c-bus mode register C read/write CCC CCac1 06h 68-byte buffer
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 4 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 6. pinning information 6.1 pinning fig 2. pin con?guration of so20 fig 3. pin con?guration of tssop20 fig 4. pin con?guration of dip20 fig 5. pin con?guration of hvqfn20 pca9665d v ss 002aab020 d0 d1 d2 d3 d4 d5 d6 d7 i.c. 1 2 3 4 5 6 7 8 9 10 12 11 14 13 16 15 18 17 20 19 v dd sda scl reset int a1 a0 ce rd wr pca9665pw d0 002aab021 1 2 3 4 5 6 7 8 9 10 12 11 14 13 16 15 18 17 20 19 v ss d1 d2 d3 d4 d5 d6 d7 i.c. v dd sda scl reset int a1 a0 ce rd wr PCA9665N d0 v dd d1 sda d2 scl d3 reset d4 int d5 a1 d6 a0 d7 ce i.c. rd v ss wr 002aab019 1 2 3 4 5 6 7 8 9 10 12 11 14 13 16 15 18 17 20 19 002aab022 pca9665bs transparent top view a0 d6 d7 a1 d5 int d4 reset d3 scl i.c. v ss wr rd ce d2 d1 d0 v dd sda 5 11 4 12 3 13 2 14 1 15 6 7 8 9 10 20 19 18 17 16 terminal 1 index area
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 5 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 6.2 pin description [1] hvqfn package die supply ground is connected to both the v ss pin and the exposed center pad. the v ss pin must be connected to supply ground for proper device operation. for enhanced thermal, electrical, and board-level performance, the exposed pad needs to be soldered to the board using a corresponding thermal pad on the board, and for proper heat conduction through the board thermal vias need to be incorporated in the pcb in the thermal pad region. table 2. pin description symbol pin type description dip20, so20, tssop20 hvqfn20 d0 1 18 i/o data bus: bidirectional 3-state data bus used to transfer commands, data and status between the bus controller and the cpu. d0 is the least signi?cant bit. d1 2 19 i/o d2 3 20 i/o d3 4 1 i/o d4 5 2 i/o d5 6 3 i/o d6 7 4 i/o d7 8 5 i/o i.c. 9 6 - internally connected: must be left ?oating (pulled low internally) v ss 10 7 [1] power supply ground wr 11 8 i write strobe: when low and ce is also low, the content of the data bus is loaded into the addressed register. data are latched on the rising edge of either wr or ce. rd 12 9 i read strobe: when low and ce is also low, causes the contents of the addressed register to be presented on the data bus. the read cycle begins on the falling edge of rd. ce 13 10 i chip enable: active low input signal. when low, data transfers between the cpu and the bus controller are enabled on d0 to d7 as controlled by the wr, rd and a0 to a1 inputs. when high, places the d0 to d7 lines in the 3-state condition. data are written into the addressed register on rising edge of either ce or wr. a0 14 11 i address inputs: selects the bus controllers internal registers and ports for read/write operations. a1 15 12 i int 16 13 o interrupt request: active low, open-drain, output. this pin requires a pull-up device. reset 17 14 i reset: active low input. a low level clears internal registers and resets the i 2 c-bus state machine. scl 18 15 i/o i 2 c-bus serial clock input/output (open-drain). this pin requires a pull-up device. sda 19 16 i/o i 2 c-bus serial data input/output (open-drain). this pin requires a pull-up device. v dd 20 17 power power supply: 2.3 v to 3.6 v
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 6 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7. functional description 7.1 general the pca9665 acts as an interface device between standard high-speed parallel buses and the serial i 2 c-bus. on the i 2 c-bus, it can act either as a master or slave. bidirectional data transfer between the i 2 c-bus and the parallel-bus microcontroller is carried out on a byte or buffered basis, using either an interrupt or polled handshake. 7.2 internal oscillator the pca9665 contains an internal 28.5 mhz oscillator which is used for all i 2 c-bus timing. the oscillator requires up to 550 m s to start-up after ensio bit is set to 1. 7.3 registers the pca9665 contains eleven registers which are used to con?gure the operation of the device as well as to send and receive serial data. there are four registers that can be accessed directly and seven registers that are accessed indirectly by setting a register pointer. the four direct registers are selected by setting pins a0 and a1 to the appropriate logic levels before a read or write operation is executed on the parallel bus. the seven indirect registers require that the indptr (indirect register pointer, one of the four direct registers described above) is initially loaded with the address of the register in the indirect address space before a read or write is performed to the indirect data ?eld. for example, in order to write to the indirectly addressed i2cscll register, the indptr register should be loaded with 02h by performing a write to the direct indptr register (a1 = 0, a0 = 0). then the i2cscll register can be programmed by writing to the indirect data ?eld (a1 = 1, a0 = 0) in the direct address space. register mapping is described in t ab le 3 , t ab le 4 and figure 6 . remark: do not write to any i 2 c-bus registers while the i 2 c-bus is busy and the pca9665 is in master or addressed slave mode. [1] see section 8.10 p o w er-on reset for more detail. table 3. direct register selection by setting a0 and a1 register name register function a1 a0 read/write default i2csta status 0 0 r f8h indptr indirect register pointer 0 0 w 00h i2cdat data 0 1 r/w 00h i2ccon control 1 1 r/w 00h [1] indirect indirect data ?eld access 1 0 r/w 00h
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 7 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 4. indirect register selection by setting a1 = 1 and a0 = 0 register name register function indptr read/write default i2ccount byte count 00h r/w 01h i2cadr own address 01h r/w e0h i2cscll scl low period 02h r/w 9dh i2csclh scl high period 03h r/w 86h i2cto time-out 04h r/w ffh i2cpreset parallel software reset 05h w 00h i2cmode i 2 c-bus mode 06h r/w 00h fig 6. register mapping ?owchart 002aab459 i2csta register a1 a0 = 00 read? yes no indptr register a1 a0 = 00 write? yes no a1 a0 = 10 read/write? yes no indptr = 00h ? yes i2ccount register a1 a0 = 01 read/write? no indptr = 01h ? yes i2cadr register i2cdat register yes a1 a0 = 11 read/write? indptr = 02h ? yes i2cscll register i2ccon register yes indptr = 03h ? yes i2csclh register no no no no indptr = 04h ? yes i2cto register no indptr = 05h ? yes i2cpreset register no indptr = 06h ? yes i2cmode register no reserved (write only)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 8 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7.3.1 direct registers 7.3.1.1 the status register, i2csta (a1 = 0, a0 = 0) i2csta is an 8-bit read-only register. the two least signi?cant bits are always zero. the six most signi?cant bits contain the status code. there are 30 possible status codes. when i2csta contains f8h, it indicates the idle state and therefore no serial interrupt is requested. all other i2csta values correspond to de?ned states. when each of these states is entered, a serial interrupt is requested (si = 1 and int asserted low). remark: data in i2csta is valid only when a serial interrupt occurs (si = 1 and int asserted low). reading the register when si = 0 and int is high may cause wrong values to be read. 7.3.1.2 the indirect pointer register, indptr (a1 = 0, a0 = 0) indptr is an 8-bit write-only register. it contains a pointer to a register in the indirect address space (ip[2:0]). the value in the register will determine what indirect register will be accessed when the indirect register is read or written, as de?ned in t ab le 4 . 7.3.1.3 the i 2 c-bus data register, i2cdat (a1 = 0, a0 = 1) i2cdat is an 8-bit read/write register. it contains a byte of serial data to be transmitted or a byte which has just been received. in master mode, this includes the slave address that the master wants to send out on the i 2 c-bus, with the most signi?cant bit of the slave address in the sd7 bit position and the read/write bit in the sd0 bit position. the cpu can read from and write to this 8-bit register while the pca9665 is not in the process of shifting a byte. this occurs when pca9665 is in a de?ned state and the serial interrupt ?ag is set. data in i2cdat remains stable as long as si is set. whenever the pca9665 generates an interrupt, the i2cdat register contains the data byte that was just transferred on the i 2 c-bus. table 5. i2csta - status register (a1 = 0, a0 = 0) bit allocation 7 6 5 4 3 2 1 0 st5 st4 st3 st2 st1 st0 0 0 table 6. i2csta - status register (a1 = 0, a0 = 0) bit description bit symbol description 7:2 st[5:0] status code corresponding to the different i 2 c-bus states 1:0 - always at zero table 7. indptr - indirect register pointer (a1 = 0, a0 = 0) bit allocation 7 6 5 4 3 2 1 0 - - - - - ip2 ip1 ip0 table 8. indptr - indirect pointer register (a1 = 0, a0 = 0) bit description bit symbol description 7:3 - reserved; must be written with zeroes 2:0 ip2 to ip0 address of the indirect register
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 9 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller in byte mode, the cpu can read or write a single byte at a time. in buffered mode, the cpu can read or write up to 68 bytes at a time. see section 8.1 con? gur ation modes for more detail. remark: the i2cdat register will capture the serial address as data when addressed via the serial bus. remark: in byte mode only, the data register will capture data from the serial bus during 38h (arbitration lost in slave address + r/ w or data bytes causing this data in i2cdat to be changed), so the i2cdat register will need to be reloaded when the bus becomes free. in buffered mode, the data is not written in the data register when arbitration is lost, which keeps the buffer intact. 7.3.1.4 the control register, i2ccon (a1 = 1, a0 = 1) i2ccon is an 8-bit read/write register. two bits are affected by the bus controller hardware: the si bit is set when a serial interrupt is requested, and the sto bit is cleared when a stop condition is present on the i 2 c-bus. a write to the i2ccon register via the parallel interface automatically clears the si bit, which causes the serial interrupt line to be de-asserted and the next clock pulse on the scl line to be generated. remark: since none of the registers should be written to via the parallel interface once the serial interrupt line has been de-asserted, all the other registers that need to be modi?ed should be written to before the content of the i2ccon register is modi?ed. table 9. i2cdat - data register (a1 = 0, a0 = 1) bit allocation 7 6 5 4 3 2 1 0 sd7 sd6 sd5 sd4 sd3 sd2 sd1 sd0 table 10. i2cdat - data register (a1 = 0, a0 = 1) bit description bit symbol description 7:0 sd[7:0] eight bits to be transmitted or just received. a logic 1 in i2cdat corresponds to a high level on the i 2 c-bus. a logic 0 corresponds to a low level on the bus. table 11. i2ccon - control register (a1 = 1, a0 = 1) bit allocation 7 6 5 4 3 2 1 0 aa ensio sta sto si - - mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 10 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 12. i2ccon - control register (a1 = 1, a0 = 1) bit description bit symbol description 7 aa the assert acknowledge ?ag. aa = 1: if the aa ?ag is set, an acknowledge (low level on sda) will be returned during the acknowledge clock pulse on the scl line when: ? own slave address has been received (as de?ned in i2cadr register). ? a data byte has been received while the bus controller is in the master receiver mode. ? a data byte has been received while the bus controller is in the addressed slave receiver mode. aa = 0: if the aa ?ag is reset, a not acknowledge (high level on sda) will be returned during the acknowledge clock pulse on scl when: ? own slave address has been received (as de?ned in i2cadr register). ? a data byte has been received while the pca9665 is in the master receiver mode. ? a data byte has been received while the pca9665 is in the addressed slave receiver mode. when the bus controller is in the addressed slave transmitter mode, state c8h will be entered after the last data byte is transmitted and an ack is received from the master receiver (see figure 10 and figure 14 ). when si is cleared, the pca9665 enters the not addressed slave receiver mode, and the sda line remains at a high level. in state c8h, the aa ?ag can be set again for future address recognition. when the pca9665 is in the not addressed slave mode, its own slave address is ignored. consequently, no acknowledge is returned, and a serial interrupt is not requested. thus, the bus controller can be temporarily released from the i 2 c-bus while the bus status is monitored. while the bus controller is released from the bus, start and stop conditions are detected, and serial data is shifted in. address recognition can be resumed at any time by setting the aa ?ag. 6 ensio the bus controller enable bit. ensio = 0: when ensio is 0, the sda and scl outputs are in a high-impedance state. sda and scl input signals are ignored, the pca9665 is in the not addressed slave state. internal oscillator is off. ensio = 1: when ensio is 1, the pca9665 is enabled. after the ensio bit is set to 1, it takes 550 m s enable time for the internal oscillator to start up and the serial interface to initialize. the pca9665 will enter either the master or the slave mode after this time. ensio should not be used to temporarily release the pca9665 from the i 2 c-bus since, when ensio is reset, the i 2 c-bus status is lost. the aa ?ag should be used instead (see description of the aa ?ag above). in the following text, it is assumed that ensio = 1 for normal mode operation. for power-up behavior, please refer to section 8.10 p o w er-on reset .
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 11 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller remark: ensio bit value must be changed only when the i 2 c-bus is idle. 7.3.1.5 the indirect data ?eld access register, indirect (a1 = 1, a0 = 0) the registers in the indirect address space can be accessed using the indirect data ?eld. before writing or reading such a register, the indptr register should be written with the address of the indirect register that needs to be accessed. once the indptr register contains the appropriate value, reads and writes to the indirect data ?eld will actually read and write the selected indirect register. 5 sta the start ?ag. sta = 1: when the sta bit is set to enter a master mode, the bus controller hardware checks the status of the i 2 c-bus and generates a start condition if the bus is free. if the bus is not free, then the bus controller waits for a stop condition (which will free the bus) and generates a start condition after the minimum buffer time (t buf ) has elapsed. if sta is set while the bus controller is already in a master mode and one or more bytes are transmitted or received, the bus controller transmits a repeated start condition. sta may be set at any time. sta may also be set when the bus controller is an addressed slave. a start condition will then be generated after a stop condition and the minimum buffer time (t buf ) has elapsed. sta = 0: when the sta bit is reset, no start condition or repeated start condition will be generated. 4 sto the stop ?ag. sto = 1: when the sto bit is set while the bus controller is in a master mode, a stop condition is transmitted on the i 2 c-bus. when a stop condition is detected on the bus, the hardware clears the sto ?ag. if the sta and sto bits are both set, then a stop condition is transmitted on the i 2 c-bus, if the pca9665 is in a master mode. the bus controller then transmits a start condition after the minimum buffer time (t buf ) has elapsed. sto=0: when the sto bit is reset, no stop condition will be generated. 3 si the serial interrupt ?ag. si = 1: when the si ?ag is set, and, if the ensio bit is also set, a serial interrupt is requested. si is set by hardware when one of 29 of the 30 possible states of the bus controller states is entered. the only state that does not cause si to be set is state f8h, which indicates that no relevant state information is available. while si is set, the low period of the serial clock on the scl line is stretched, and the serial transfer is suspended. a high level on the scl line is unaffected by the serial interrupt ?ag. si is automatically cleared when the i2ccon register is written. the si bit cannot be set by the user. si = 0: when the si ?ag is reset, no serial interrupt is requested, and there is no stretching of the serial clock on the scl line. 2:1 - reserved. when i2ccon is read, zeroes are read. must be written with zeroes. 0 mode the mode ?ag. mode = 0; byte mode. see section 8.1.1 byte mode for more detail. mode = 1; buffered mode. see section 8.1.2 buff ered mode for more detail. table 12. i2ccon - control register (a1 = 1, a0 = 1) bit description continued bit symbol description
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 12 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7.3.2 indirect registers 7.3.2.1 the byte count register, i2ccount (indirect address 00h) the i2ccount register is an 8-bit read/write register. it contains the number of bytes that have been stored in master/slave buffered receiver mode, and the number of bytes to be sent in master/slave buffered transmitter mode. bit 7 is the last byte control bit and applies to the master/slave buffered receiver mode only. the data in the i2ccount register is relevant only in buffered mode (mode = 1) and should not be used (read or written) in byte mode (mode = 0). 7.3.2.2 the own address register, i2cadr (indirect address 01h) i2cadr is an 8-bit read/write register. it is not affected by the bus controller hardware. the content of this register is irrelevant when the bus controller is in a master mode. in the slave modes, the seven most signi?cant bits must be loaded with the microcontroller's own slave address and the least signi?cant bit determines if the general call address will be recognized or not. remark: ad[7:1] must be different from the general call address (000 0000) for proper device operation. table 13. i2ccount - byte count register (indirect address 00h) bit allocation 7 6 5 4 3 2 1 0 lb bc6 bc5 bc4 bc3 bc2 bc1 bc0 table 14. i2ccount - byte count register (indirect address 00h) bit description bit symbol description 7 lb last byte control bit. master/slave buffered receiver mode only. lb = 1: pca9665 does not acknowledge the last received byte. lb = 0: pca9665 acknowledges the last received byte. a future bus transaction must complete the read sequence by not acknowledging the last byte. 6:0 bc[6:0] number of bytes to be read or written (up to 68 bytes). if bc[6:0] is equal to 0 or greater than 68 (44h), no bytes will be read or written and an interrupt is immediately generated after writing to the i2ccon register (in buffered mode only). table 15. i2cadr - address register (indirect address 01h) bit allocation 7 6 5 4 3 2 1 0 ad7 ad6 ad5 ad4 ad3 ad2 ad1 gc table 16. i2cadr - address register (indirect address 01h) bit description bit symbol description 7:1 ad[7:1] own slave address. the most signi?cant bit corresponds to the ?rst bit received from the i 2 c-bus after a start condition. a logic 1 in i2cadr corresponds to a high level on the i 2 c-bus, and a logic 0 corresponds to a low level on the bus. 0 gc general call. gc = 1: general call address (00h) is recognized. gc = 0: general call address (00h) is ignored.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 13 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7.3.2.3 the clock rate registers, i2cscll and i2csclh (indirect addresses 02h and 03h) i2cscll and i2csclh are 8-bit read/write registers. they de?ne the data rate for the pca9665 when used as a bus master. the actual frequency is determined by t high (time where scl is high), t low (time where scl is low), t r (rise time), and t f (fall time) values. t high and t low are calculated based on the values that are programmed into i2csclh and i2cscll registers and the internal oscillator frequency. t r and t f are system/application dependent. with t osc = internal oscillator period = 35 ns 5ns remark: the i2cmode register needs to be programmed before programming the i2cscll and i2csclh registers in order to know which i 2 c-bus mode is selected. see section 7.3.2.6 the i 2 c-b us mode register , i2cmode (indirect address 06h) for more detail. standard-mode is the default selected mode at power-up or after reset. table 17. i2cscll - clock rate low register (indirect address 02h) bit allocation 7 6 5 4 3 2 1 0 l7 l6 l5 l4 l3 l2 l1 l0 table 18. i2cscll - clock rate low register (indirect address 02h) bit description bit symbol description 7:0 l[7:0] eight bits de?ning the low state of scl. table 19. i2csclh - clock rate high register (indirect address 03h) bit allocation 7 6 5 4 3 2 1 0 h7 h6 h5 h4 h3 h2 h1 h0 table 20. i2csclh - clock rate high register (indirect address 03h) bit description bit symbol description 7:0 h[7:0] eight bits de?ning the high state of scl. f scl 1 t osc i2cscll i2csclh + () t r t f ++ ---------------------------------------------------------------------------------------------- - =
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 14 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7.3.2.4 the time-out register, i2cto (indirect address 04h) i2cto is an 8-bit read/write register. it is used to determine the maximum time that scl is allowed to be in a low logic state before the i 2 c-bus state machine is reset or the pca9665 initiates a forced action on the i 2 c-bus. when the i 2 c-bus interface is operating, i2cto is loaded in the time-out counter at every low scl transition. the time-out register can be used in the following cases: ? when the bus controller, in the master mode, wants to send a start condition and the scl line is held low by some other device. then the bus controller waits a time period equivalent to the time-out value for the scl to be released. in case it is not released, the bus controller concludes that there is a bus error, loads 78h in the i2csta register, generates an interrupt signal and releases the scl and sda lines. after the microcontroller reads the status register, it needs to send a reset in order to reset the bus controller. ? in the master mode, the time-out feature starts every time the scl goes low. if scl stays low for a time period equal to or greater than the time-out value, the bus controller concludes there is a bus error and behaves in the manner described above. when the i 2 c-bus interface is operating, i2cto is loaded in the time-out counter at every scl transition. see section 8.11 reset for more information. ? in case of a forced access to the i 2 c-bus. (see more details in section 8.9.3 f orced access to the i 2 c-b us .) 7.3.2.5 the parallel software reset register, i2cpreset (indirect address 05h) i2cpreset is an 8-bit write-only register. programming the i2cpreset register allows the user to reset the pca9665 under software control. the software reset is achieved by writing two consecutive bytes to this register. the ?rst byte must be a5h while the second byte must be 5ah. the writes must be consecutive and the values must match a5h and 5ah. if this sequence is not followed as described, the reset is aborted. table 21. i2cto - time-out register (indirect register 04h) bit allocation 7 6 5 4 3 2 1 0 te to6 to5 to4 to3 to2 to1 to0 table 22. i2cto - time-out register (indirect register 04h) bit description bit symbol description 7 te time-out enable/disable te = 1: time-out function enabled te = 0: time-out function disabled 6:0 to[6:0] time-out value. the time-out period = (i2cto[6:0] + 1) 143.36 m s. the time-out value may vary some, and is an approximate value.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 15 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 7.3.2.6 the i 2 c-bus mode register, i2cmode (indirect address 06h) i2cmode is an 8-bit read/write register. it contains the control bits that select the correct timing parameters when the device is used in master mode (ac[1:0]). timing parameters involved with ac[1:0] are t buf , t hd;sta , t su;sta , t su;sto , t high , t low . remark: change from an i 2 c-bus mode to a slower one (fast-mode to standard-mode, for example) will cause the high and low timings of scl to be violated. it is then required to program the i2cscll and i2csclh registers with values in accordance with the selected mode. [1] i2cscll and i2csclh values in the table also represents the minimum values that can be used for the corresponding i 2 c-bus mode. use of lower values will cause the minimum values to be loaded. [2] using the formula table 23. i2cmode - i 2 c-bus mode register (indirect address 06h) bit allocation 7 6 5 4 3 2 1 0 ------ac1ac0 table 24. i2cmode - i 2 c-bus mode register (indirect address 06h) bit description bit symbol description 7:2 - reserved. when i2cmode is read, zeroes are read. must be written with zeroes. 1:0 ac[1:0] i 2 c-bus mode selection to ensure proper timing parameters (see t ab le 25 ). ac[1:0] = 00: standard-mode ac parameters selected. ac[1:0] = 01: fast-mode ac parameters selected. ac[1:0] = 10: fast-mode plus ac parameters selected. ac[1:0] = 11: turbo mode. in this mode, the user is not limited to a maximum frequency of 1 mhz. table 25. i 2 c-bus mode selection example [1] i2cscll (hexadecimal) i2csclh (hexadecimal) i 2 c-bus frequency (khz) [2] ac[1:0] mode 9d 86 99.9 00 standard 2c 14 396.8 01 fast 11 09 952.3 10 fast-mode plus 0e 05 11 turbo mode f scl 1 t osc i2cscll i2csclh + () t r t f ++ ---------------------------------------------------------------------------------------------- - =
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 16 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8. pca9665 modes 8.1 con?guration modes byte mode and buffered mode are selected using the mode bit in i2ccon register: mode = 0: byte mode mode = 1: buffered mode 8.1.1 byte mode the byte mode allows communication on a single command basis. only one speci?c command is executed at a time and the status register is updated once this single command has been performed. a command can be a start, a stop, a byte write, a byte read, and so on. 8.1.2 buffered mode the buffered mode allows several instructions to be executed before an interrupt is generated and before the i2csta register is updated. this allows the microcontroller to request a sequence, up to 68 bytes in a single transmission and lets the pca9665 perform it without having to access the status register and the control register each time a single command is performed. the microcontroller can then perform other tasks while the pca9665 performs the requested sequence. the number of bytes that needs to be sent from the internal buffer (transmitter mode) or received into the internal buffer (receiver mode) is de?ned in the indirectly addressed i2ccount register (bc[6:0]). up to 68 bytes can be sent or received. 8.2 operating modes the four operating modes are: ? master transmitter ? master receiver ? slave receiver ? slave transmitter each mode can be used on a byte basis (byte mode) or in an up to 68-byte buffer basis (buffered mode). data transfers in each mode of operation are shown in figure 7 through figure 10 . these ?gures contain the following abbreviations: s start condition sla 7-bit slave address r read bit (high level at sda) w write bit (low level at sda) a acknowledge bit (low level at sda) a not acknowledge bit (high level at sda) data 8-bit data byte
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 17 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller p stop condition in figure 7 , figure 8 , figure 9 , figure 10 , figure 11 , figure 12 , figure 13 and figure 14 , circles are used to indicate when the serial interrupt ?ag is set. a serial interrupt is not generated when i2csta = f8h. this happens on a stop condition or when an external reset is generated (at power-up, when reset pin is going low or during a software reset on the parallel bus). the numbers in the circles show the status code held in the i2csta register. at these points, a service routine must be executed to continue or complete the serial transfer. these service routines are not critical since the serial transfer is suspended until the serial interrupt ?ag is cleared by software. when a serial interrupt routine is entered, the status code in i2csta is used to branch to the appropriate service routine. for each status code, the required software action and details of the following serial transfer are given in t ab le 27 , t ab le 28 , t ab le 31 , t ab le 32 , t ab le 35 , t ab le 36 , t ab le 40 , and t ab le 41 . 8.3 byte mode 8.3.1 master transmitter byte mode in the master transmitter byte mode, a number of data bytes are transmitted to a slave receiver (see figure 7 ). before the master transmitter byte mode can be entered, i2ccon must be initialized as shown in t ab le 26 . ensio must be set to logic 1 to enable the pca9665. if the aa bit is reset, the pca9665 will not acknowledge its own slave address in the event of another device becoming master of the bus. (in other words, if aa is reset, pca9665 cannot enter a slave mode.) sta, sto, and si must be reset. once ensio has been set to 1, it takes about 550 m sfor the oscillator to start up. the master transmitter byte mode may now be entered by setting the sta bit. the i 2 c-bus state machine will ?rst test the i 2 c-bus and generate a start condition as soon as the bus becomes free. when a start condition is transmitted, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and the status code in the status register (i2csta) will be 08h. this status code must be used to vector to an interrupt service routine that loads i2cdat with the slave address and the data direction bit (sla+w). a write to i2ccon resets the si bit, clears the interrupt ( int goes high) and allows the serial transfer to continue. when the slave address with the direction bit have been transmitted, the serial interrupt ?ag (si) is set again, the interrupt line ( int) goes low again and i2csta is loaded with the following possible codes: ? 18h if an acknowledgment bit (ack) has been received ? 20h if an no acknowledgment bit (nack) has been received ? 38h if the pca9665 lost the arbitration table 26. i2ccon initialization (byte mode) bit 7 6 5 4 3 2 1 0 symbol aa ensio sta sto si reserved reserved mode value x1000xx0
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 18 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller ? b0h if the pca9665 lost the arbitration and is addressed as a slave transmitter (slave mode enabled with aa = 1) ? 68h if the pca9665 lost the arbitration and is addressed as a slave receiver (slave mode enabled with aa = 1) ? d8h if the pca9665 lost the arbitration and is addressed as a slave receiver during a general call sequence (slave mode enabled with aa = 1 and general call address enabled with gc = 1 in i2cadr register) the appropriate action to be taken for each of these status codes is detailed in t ab le 27 . ensio is not affected by the serial transfer and is not referred to in t ab le 27 . after a repeated start condition (state 10h), the pca9665 may switch to the master receiver mode by loading i2cdat with sla+r. remark: a master should not transmit its own slave address.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 19 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller (1) see t ab le 27 (2) de?ned state when a single byte is sent and an ack is received. (3) de?ned state when a single byte is sent and a nack is received. (4) master receiver byte mode is entered when mode = 0. master receiver buffered mode is entered when mode = 1. fig 7. format and states in the master transmitter byte mode (mode = 0) 08h s sla w a data a p 18h 28h f8h mt 10h s sla w r to master receiver mode entry = mr (4) a p 30h f8h a p 20h f8h 002aab024 a or a 38h other mst continues a or a 38h other mst continues a b0h other mst continues 68h to corresponding states in slave transmitter mode to corresponding states in slave receiver mode successful transmission to a slave receiver next transfer started with a repeated start condition not acknowledge received after the slave address not acknowledge received after a data byte arbitration lost in slave address or data byte arbitration lost and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master d8h to corresponding states in slave receiver mode (general call) (2) (3)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 20 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 27. master transmitter byte mode (mode = 0) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccon sta sto si aa mode 08h a start condition has been transmitted load sla+w x x 0 x 0 sla+w will be transmitted; ack/nack will be received 10h a repeated start condition has been transmitted load sla+w or x x 0 x 0 sla+w will be transmitted; ack/nack will be received load sla+r x x 0 x 0 sla+r will be transmitted; pca9665 will be switched to master receiver byte mode 18h sla+w has been transmitted; ack has been received load data byte or 0 0 0 x 0 data byte will be transmitted; ack/nack will be received no i2cdat action or 1 0 0 x 0 repeated start will be transmitted; no i2cdat action or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset no i2cdat action 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset 20h sla+w has been transmitted; nack has been received load data byte or 0 0 0 x 0 data byte will be transmitted; ack/nack will be received no i2cdat action or 1 0 0 x 0 repeated start will be transmitted; no i2cdat action or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset no i2cdat action 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset 28h data byte in i2cdat has been transmitted; ack has been received load data byte or 0 0 0 x 0 data byte will be transmitted; ack/nack will be received no i2cdat action or 1 0 0 x 0 repeated start will be transmitted; no i2cdat action or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset no i2cdat action 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 21 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 30h data byte in i2cdat has been transmitted; nack has been received load data byte or 0 0 0 x 0 data byte will be transmitted; ack/nack will be received no i2cdat action or 1 0 0 x 0 repeated start will be transmitted; no i2cdat action or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset no i2cdat action 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset 38h arbitration lost in sla+w or data bytes no i2cdat action or 00000 i 2 c-bus will be released; pca9665 will enter slave mode. no i2cdat action or 00010 i 2 c-bus will be released; pca9665 will enter the slave mode. no i2cdat action 1 0 0 x 0 a start condition will be transmitted when the bus becomes free table 27. master transmitter byte mode (mode = 0) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccon sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 22 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.3.2 master receiver byte mode in the master receiver byte mode, a number of data bytes are received from a slave transmitter one byte at a time (see figure 8 ). the transfer is initialized as in the master transmitter byte mode. the master receiver byte mode may now be entered by setting the sta bit. the i 2 c-bus state machine will ?rst test the i 2 c-bus and generate a start condition as soon as the bus becomes free. when a start condition is transmitted, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and the status code in the status register (i2csta) will be 08h. this status code must be used to vector to an interrupt service routine that loads i2cdat with the slave address and the data direction bit (sla+r). a write to i2ccon resets the si bit, clears the interrupt ( int goes high) and allows the serial transfer to continue. when the slave address and the data direction bit have been transmitted, the serial interrupt ?ag (si) is set again, the interrupt line ( int) goes low again and i2csta is loaded with the following possible codes: ? 40h if an acknowledgment bit (ack) has been received for the slave address with direction bit ? 48h if a no acknowledgment bit (nack) has been received for the slave address with direction bit ? 38h if the pca9665 lost the arbitration ? b0h if the pca9665 lost the arbitration and is addressed as a slave transmitter (slave mode enabled with aa = 1) ? 68h if the pca9665 lost the arbitration and is addressed as a slave receiver (slave mode enabled with aa = 1) ? d8h if the pca9665 lost the arbitration and is addressed as a slave receiver during a general call sequence (slave mode enabled with aa = 1 and general call address enabled with gc = 1 in i2cadr register). the appropriate action to be taken for each of these status codes is detailed in t ab le 28 . ensio is not affected by the serial transfer and is not referred to in t ab le 28 . after a repeated start condition (state 10h), the pca9665 may switch to the master transmitter mode by loading i2cdat with sla+w. remark: a master should not transmit its own slave address.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 23 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller (1) see t ab le 28 . (2) de?ned state when a single byte is received and an ack is sent (aa = 1). (3) de?ned state when a single byte is received and a nack is sent (aa = 0). (4) master transmitter byte mode is entered when mode = 0. master transmitter buffered mode is entered when mode = 1. fig 8. format and states in the master receiver byte mode (mode = 0) 08h s sla r a data a p 40h 50h f8h mr 10h s sla r w to master transmitter mode entry = mt (4) a p 48h f8h 002aab025 a 38h other mst continues a or a 38h other mst continues a other mst continues successful reception from a slave transmitter next transfer started with a repeated start condition not acknowledge received after the slave address arbitration lost in slave address or acknowledge bit arbitration lost and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master data a 58h (2) (3) b0h 68h to corresponding states in slave transmitter mode to corresponding states in slave receiver mode d8h to corresponding states in slave receiver mode (general call)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 24 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 28. master receiver byte mode (mode = 0) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccon sta sto si aa mode 08h a start condition has been transmitted load sla+r x x 0 x 0 sla+r will be transmitted; ack/nack bit will be received 10h a repeated start condition has been transmitted load sla+r or x x 0 x 0 sla+r will be transmitted; ack/nack bit will be received load sla+w x x 0 x 0 sla+w will be transmitted; pca9665 will be switched to master transmitter byte mode 38h arbitration lost in nack bit no i2cdat action or 000x0 i 2 c-bus will be released; pca9665 will enter a slave mode no i2cdat action 1 0 0 x 0 a start condition will be transmitted when the bus becomes free 40h sla+r has been transmitted; ack has been received no i2cdat action or 0 0 0 0 0 data byte will be received; nack bit will be returned no i2cdat action 0 0 0 1 0 data byte will be received; ack bit will be returned 48h sla+r has been transmitted; nack has been received no i2cdat action or 1 0 0 x 0 repeated start condition will be transmitted no i2cdat action or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset no i2cdat action 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset 50h data byte has been received; ack has been returned read data byte or 0 0 0 0 0 data byte will be received; nack bit will be returned read data byte 0 0 0 1 0 data byte will be received; ack bit will be returned 58h data byte has been received; nack has been returned read data byte or 1 0 0 x 0 repeated start condition will be transmitted read data byte or 0 1 0 x 0 stop condition will be transmitted; sto ?ag will be reset read data byte 1 1 0 x 0 stop condition followed by a start condition will be transmitted; sto ?ag will be reset
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 25 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.3.3 slave receiver byte mode in the slave receiver byte mode, a number of data bytes are received from a master transmitter one byte at a time (see figure 9 ). to initiate the slave receiver mode, i2cadr and i2ccon must be loaded as shown in t ab le 29 and t ab le 30 . the upper 7 bits are the i 2 c-bus address to which pca9665 will respond when addressed by a master. gc is the control bit that allows the pca9665 to respond or not to the general call address (00h). when programmed to logic 1, the pca9665 will acknowledge the general call address. when programmed to logic 0, the pca9665 will not acknowledge the general call address. ensio must be set to logic 1 to enable the i 2 c-bus interface. the aa bit must be set to enable pca9665 to acknowledge its own slave address, sta, sto, and si must be reset. when i2cadr and i2ccon have been initialized, the pca9665 waits until it is addressed by its own slave address followed by the data direction bit which must be 0 (w) to operate in the slave receiver mode. after its own slave address and the w bit have been received, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low, and i2csta is loaded with 60h. this status code is used to vector to an interrupt service routine, and the appropriate action to be taken is detailed in t ab le 31 . the slave receiver buffered mode may also be entered when: ? the arbitration is lost while the pca9665 is in the master mode. see status 68h and d8h. ? the general call address (00h) has been received (general call address enabled with gc = 1). see status d0h. if the aa bit is reset during a transfer, the pca9665 will return a not acknowledge (logic 1) on sda after the next received data byte. while aa is reset, the i 2 c-bus state machine does not respond to its own slave address. however, the i 2 c-bus is still monitored and address recognition may be resumed at any time by setting aa. this means that the aa bit may be used to temporarily isolate pca9665 from the i 2 c-bus. table 29. i2cadr initialization bit 7 6 5 4 3 2 1 0 symbol ad7 ad6 ad5 ad4 ad3 ad2 ad1 gc value own slave address x table 30. i2ccon initialization bit 7 6 5 4 3 2 1 0 symbol aa ensio sta sto si - - mode value 11000xx0
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 26 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller (1) see t ab le 31 . (2) de?ned state when a single byte is received and an ack is sent (aa = 1). (3) de?ned state when a single byte is received and a nack is sent (aa = 0). fig 9. format and states in the slave receiver byte mode (mode = 0) s sla w a data a p or s 60h 80h a0h a 68h 002aab026 reception of own slave address and one or more data bytes; all are acknowledged. last data byte received is not acknowledged arbitration lost as mst and addressed as slave data a 80h p or s f8h a 88h on stop p or s f8h on stop general call = 00h a a p or s d0h e0h a0h a d8h data a e0h p or s a e8h reception of the general call address and one or more data bytes last data byte received is not acknowledged arbitration lost as mst and addressed as slave by general call s f8h on stop w (2) (2) (3) (2) (2) (3) p or s f8h on stop n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) a any number of data bytes and their associated acknowledge bits from master to slave from slave to master data data
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 27 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 31. slave receiver byte mode (mode = 0) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccon sta sto si aa mode 60h own sla+w has been received; ack has been returned no i2cdat action or x x 0 0 0 data byte will be received and nack will be returned no i2cdat action x x 0 1 0 data byte will be received and ack will be returned 68h arbitration lost in sla+r/w as master; own sla+w has been received, ack has been returned no i2cdat action or x x 0 0 0 data byte will be received and nack will be returned no i2cdat action x x 0 1 0 data byte will be received and ack will be returned d0h general call address (00h) has been received; ack has been returned. no i2cdat action or x x 0 0 0 data byte will be received and nack will be returned. no i2cdat action x x 0 1 0 data byte will be received and ack will be returned. d8h arbitration lost in sla = r/w as master; general call address has been received; ack bit has been returned. no i2cdat action or x x 0 0 0 data byte will be received and nack will be returned. no i2cdat action x x 0 1 0 data byte will be received and ack will be returned. 80h previously addressed with own slave address; data has been received; ack has been returned read data byte or x x 0 0 0 data byte will be received and nack will be returned read data byte x x 0 1 0 data byte will be received and ack will be returned 88h previously addressed with own slave address; data byte has been received; nack has been returned read data byte or 0 x 0 0 0 switched to not addressed slave mode; no recognition of own sla or general call address read data byte or 0 x 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1. read data byte or 1 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address or general call address. a start condition will be transmitted when the bus becomes free read data byte 1 x 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call will be recognized if gc = 1. a start condition will be transmitted when the bus becomes free.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 28 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller e0h previously addressed with general call; data has been received; ack has been returned read data byte or x x 0 0 0 data byte will be received and nack will be returned. read data byte x x 0 1 0 data byte will be received and ack will be returned. e8h previously addressed with general call; data has been received; nack has been returned read data byte or 0 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address or general call address. read data byte or 0 x 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1. read data byte or 1 0 0 0 0 switched to not addressed slave mode; no recognition of own slave address or general call address. a start condition will be transmitted when the bus becomes free. read data byte 1 0 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1. a start condition will be transmitted when the bus becomes free. a0h a stop condition or repeated start condition has been received while still addressed as slave receiver no i2cdat action or 0 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address or general call address. no i2cdat action or 0 x 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call will be recognized if gc = 1. no i2cdat action or 1 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address or general call. a start condition will be transmitted when the bus becomes free no i2cdat action 1 x 0 1 0 switched to not addressed slave mode; own slave address will be recognized; general call will be recognized if gc = 1. a start condition will be transmitted when the bus becomes free. table 31. slave receiver byte mode (mode = 0) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccon sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 29 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.3.4 slave transmitter byte mode in the slave transmitter byte mode, a number of data bytes are transmitted to a master receiver one byte at a time (see figure 10 ). data transfer is initialized as in the slave receiver byte mode. when i2cadr and i2ccon have been initialized, the pca9665 waits until it is addressed by its own slave address followed by the data direction bit which must be 1 (r) for the pca9665 to operate in the slave transmitter mode. after its own slave address and the r bit have been received, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and i2csta is loaded with a8h. this status code is used to vector to an interrupt service routine, and the appropriate action to be taken is detailed in t ab le 32 . the slave transmitter byte mode may also be entered if arbitration is lost while the pca9665 is in the master mode. see state b0h and appropriate actions in t ab le 32 . if the aa bit is reset during a transfer, the pca9665 will transmit the last byte of the transfer and enter state c8h. the pca9665 is switched to the not addressed slave mode and will ignore the master receiver if it continues the transfer. thus the master receiver receives all 1s as serial data. while aa is reset, the pca9665 does not respond to its own slave address. however, the i 2 c-bus is still monitored, and address recognition may be resumed at any time by setting aa. this means that the aa bit may be used to temporarily isolate sio from the i 2 c-bus. (1) see t ab le 31 . (2) de?ned state when a single byte is transmitted and an ack is received. (3) de?ned state when a single byte is transmitted and a nack is received. (4) de?ned state when a single byte is transmitted and the pca9665 goes to the non-addressed mode (aa = 0) and an ack is received. fig 10. format and states in the slave transmitter byte mode (mode = 0) s sla r a data a p or s a8h b8h f8h 002aab027 reception of own slave address and transmission of one or more data bytes arbitration lost as mst and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master data a c0h p or s f8h a c8h on stop on stop a b0h last data byte transmitted; switched to not addressed slave (aa bit in i2ccon = 0) all '1's (2) (3) (4)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 30 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 32. slave transmitter byte mode (mode = 0) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by pca9665 to/from i2cdat to i2ccon sta sto si aa mode a8h own sla+r has been received; ack has been returned load data byte or x x 0 0 0 last data byte will be transmitted and ack/nack bit will be received load data byte x x 0 1 0 data byte will be transmitted; ack/nack will be received b0h arbitration lost in sla+r/w as master; own sla+r has been received, ack has been returned load data byte or x x 0 0 0 last data byte will be transmitted and ack/nack bit will be received load data byte x x 0 1 0 data byte will be transmitted; ack bit will be received b8h data byte in i2cdat has been transmitted; ack has been received load data byte or x x 0 0 0 last data byte will be transmitted and ack/nack bit will be received load data byte x x 0 1 0 data byte will be transmitted; ack/nack bit will be received c0h data byte in i2cdat has been transmitted; nack has been received no i2cdat action or 0 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address. general call address recognized if gc=1. no i2cdat action or 0 x 0 1 0 switched to slave mode; own slave address will be recognized. general call address recognized if gc = 1. no i2cdat action or 1 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address. general call address recognized if gc = 1. a start condition will be transmitted when the bus becomes free no i2cdat action 1 x 0 1 0 switched to slave mode; own slave address will be recognized. general call address recognized if gc = 1. a start condition will be transmitted when the bus becomes free. c8h last data byte in i2cdat has been transmitted (aa = 0); ack has been received no i2cdat action or 0 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address. general call address recognized if gc=1. no i2cdat action or 0 x 0 1 0 switched to slave mode; own slave address will be recognized. general call address recognized if gc = 1. no i2cdat action or 1 x 0 0 0 switched to not addressed slave mode; no recognition of own slave address. general call address recognized if gc = 1. a start condition will be transmitted when the bus becomes free no i2cdat action 1 x 0 1 0 switched to slave mode; own slave address will be recognized. general call address recognized if gc = 1. a start condition will be transmitted when the bus becomes free.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 31 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.4 buffered mode 8.4.1 master transmitter buffered mode in the master transmitter buffered mode, a number of data bytes are transmitted to a slave receiver several bytes at a time (see figure 11 ). before the master transmitter buffered mode can be entered, i2ccon must be initialized as shown in t ab le 33 . ensio must be set to logic 1 to enable the pca9665. if the aa bit is reset, the pca9665 will not acknowledge its own slave address in the event of another device becoming master of the bus (in other words, if aa is reset, the pca9665 cannot enter a slave mode). sta, sto, and si must be reset. once ensio has been set to logic 1, it takes about 550 m s for the oscillator to start up. the master transmitter buffered mode may now be entered by setting the sta bit. the i 2 c-bus state machine will ?rst test the i 2 c-bus and generate a start condition as soon as the bus becomes free. when a start condition is transmitted, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and the status code in the status register (i2csta) will be 08h. this status code must be used to vector to an interrupt service routine that loads i2cdat with the slave address and the data direction bit (sla+w) followed by the number of data bytes to be sent. the byte count register (i2ccount) has been previously programmed with the number of bytes that need to be sent in a single sequence (bc[6:0]) as shown in t ab le 34 . lb bit is only used for the receiver buffered modes and can be programmed to either logic 0 or logic 1. the total number of bytes loaded in i2cdat (slave address with direction bit plus data bytes) must be equal to the value programmed in i2ccount. a write to i2ccon resets the si bit, clears the interrupt ( int goes high) and allows the serial transfer to continue. when the slave address with the direction bit and part of or all the following bytes have been transmitted, the serial interrupt ?ag (si) is set again, the interrupt line ( int) goes low again and i2csta is loaded with the following possible codes: ? 18h if an acknowledgment bit (ack) has been received for the slave address with direction bit (happens only if i2ccount = 1; no data bytes have been sent). ? 20h if a no acknowledgment bit (nack) has been received for the slave address with direction bit (no data bytes have been sent). ? 28h if the slave address with direction bit and all the data bytes have been transmitted and an acknowledgement bit has been received for each of them (number of bytes sent is equal to value in i2ccount). table 33. i2ccon initialization (buffered mode) bit 7 6 5 4 3 2 1 0 symbol aa ensio sta sto si reserved reserved mode value x1000xx1 table 34. i2ccount programming bit 7 6 5 4 3 2 1 0 symbol lb bc6 bc5 bc4 bc3 bc2 bc1 bc0 value x number of bytes received in a single sequence (1 byte to 68 bytes)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 32 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller ? 30h if the slave address with direction bit has been successfully sent and no acknowledgement (nack) has been received while transmitting the data bytes (number of total bytes sent is lower than or equal to value in i2ccount). ? 38h if the pca9665 lost the arbitration when sending the slave address with the direction bit or when sending data bytes. ? b0h if the pca9665 lost the arbitration and is addressed as a slave transmitter (slave mode enabled with aa = 1). ? 68h if the pca9665 lost the arbitration and is addressed as a slave receiver (slave mode enabled with aa = 1). ? d8h if the pca9665 lost the arbitration and is addressed as a slave receiver during a general call sequence (slave mode enabled with aa = 1 and general call address enabled with gc = 1 in i2cadr register). the appropriate action to be taken for each of these status codes is detailed in t ab le 35 . ensio is not affected by the serial transfer and is not referred to in t ab le 35 . after a repeated start condition (state 10h), the pca9665 may switch to the master receiver mode by loading i2cdat with sla+r). remark: a master should not transmit its own slave address.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 33 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller (1) see t ab le 35 (2) serial interrupt that occurs when bc[6:0] = 01. no serial interrupt if bc[6:0] > 01. (3) de?ned state when the number of bytes sent is equal to the value in i2ccount register and an ack has been received for all the bytes sent. (4) de?ned state when a nack received while number of bytes sent is lower than or equal to value in i2ccount register. (5) master receiver byte mode is entered when mode = 0. master receiver buffered mode is entered when mode = 1. remark: the master should never transmit its own slave address. fig 11. format and states in the master transmitter buffered mode (mode = 1) 08h s sla w a data a p 28h f8h mt 10h s sla w r to mst/rec mode entry = mr (5) a p 30h f8h a p 20h f8h 002aab659 a or a 38h other mst continues a or a 38h other mst continues a b0h other mst continues 68h to corresponding states in slave transmitter mode to corresponding states in slave receiver mode successful transmission to a slave receiver next transfer started with a repeated start condition not acknowledge received after the slave address not acknowledge received after a data byte arbitration lost in slave address or data byte arbitration lost and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master d8h to corresponding states in slave receiver mode (general call) (3) (4) 18h (2)
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 34 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 35. master transmitter buffered mode (mode = 1) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccount to i2ccon lb bc[6:0] sta sto si aa mode 08h a start condition has been transmitted load sla+w and the data bytes x total number of bytes to be transmitted (= sla+w + number of data bytes) x x 0 x 1 sla+w will be transmitted. if ack bit received, data bytes will be transmitted until all of them have been sent and an ack has been received for each of them or until a nack bit is received. 10h a repeated start condition has been transmitted load sla+w and the data bytes or x total number of bytes to be transmitted (= sla+w + number of data bytes) x x 0 x 1 sla+w will be transmitted. if ack bit received, data bytes will be transmitted until all of them have been sent and an ack has been received for each of them or until a nack bit is received. load sla+r x total number of bytes to be received x x 0 x 1 sla+r will be transmitted. pca9665 will be switched to master receiver buffered mode. 18h sla+w has been transmitted; ack has been received load the data bytes or x total number of data bytes to be transmitted 0 0 0 x 1 up to bc[6:0] data bytes will be transmitted (until all of them have been sent and an ack has been received for each of them or until a nack bit is received). no i2cdat action or x x 1 0 0 x 1 repeated start will be transmitted. no i2cdat action or x x 0 1 0 x 1 stop condition will be transmitted. sto ?ag will be reset. no i2cdat action x x 1 1 0 x 1 stop condition followed by a start condition will be transmitted. sto ?ag will be reset. 20h sla+w has been transmitted; nack has been received load the data bytes or 0 total number of data bytes to be transmitted 0 0 0 x 1 up to bc[6:0] data bytes will be transmitted (until all of them have been sent and an ack has been received for each of them or until a nack bit is received). no i2cdat action or 1 x 1 0 0 x 1 repeated start will be transmitted. no i2cdat action or 0 x 0 1 0 x 1 stop condition will be transmitted;. sto ?ag will be reset. no i2cdat action 1 x 1 1 0 x 1 stop condition followed by a start condition will be transmitted. sto ?ag will be reset.
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 35 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 28h bc[6:0] bytes in i2cdat have been transmitted; ack has been received for all of them load the data bytes or x total number of data bytes to be transmitted 0 0 0 x 1 up to bc[6:0] data bytes will be transmitted (until all of them have been sent and an ack has been received for each of them or until a nack bit is received). no i2cdat action or x x 1 0 0 x 1 repeated start will be transmitted. no i2cdat action or x x 0 1 0 x 1 stop condition will be transmitted. sto ?ag will be reset. no i2cdat action x x 1 1 0 x 1 top condition followed by a start condition will be transmitted. sto ?ag will be reset. 30h up to bc[6:0] bytes in i2cdat have been transmitted; nack has been received for the last byte load the data bytes or x total number of data bytes to be transmitted 0 0 0 x 1 up to bc[6:0] data bytes will be transmitted (until all of them have been sent and an ack has been received for each of them or until a nack bit is received). no i2cdat action or x x 1 0 0 x 1 repeated start will be transmitted. no i2cdat action or x x 0 1 0 x 1 stop condition will be transmitted. sto ?ag will be reset. no i2cdat action x x 1 1 0 x 1 stop condition followed by a start condition will be transmitted. sto ?ag will be reset. 38h arbitration lost in sla+w or data bytes no i2cdat action or xx 0 0 00 1 i 2 c-bus will be released; pca9665 will enter the not addressed slave mode. no i2cdat action or xx 0 0 01 1 i 2 c-bus will be released; pca9665 will enter the slave mode. no i2cdat action x x 1 0 0 x 1 a start condition will be transmitted when the bus becomes free. table 35. master transmitter buffered mode (mode = 1) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to i2ccount to i2ccon lb bc[6:0] sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 36 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.4.2 master receiver buffered mode in the master receiver buffered mode, a number of data bytes are received from a slave transmitter several bytes at a time (see figure 12 ). the transfer is initialized as in the master transmitter byte mode. the master receiver buffered mode may now be entered by setting the sta bit. the i 2 c-bus state machine will ?rst test the i 2 c-bus and generate a start condition as soon as the bus becomes free. when a start condition is transmitted, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and the status code in the status register (i2csta) will be 08h. this status code must be used to vector to an interrupt service routine that loads i2cdat with the slave address and the data direction bit (sla+r). the byte count register (i2ccount) needs to be programmed with the number of bytes that need to be received in a single sequence (bc[6:0]). lb bit is programmed with logic 0 if the last received byte needs to be acknowledged (read operation still ongoing) or with logic 1 if the last received byte needs to be not acknowledged (read operation ends so the pca9665 can issue a stop or re-start condition). a write to i2ccon resets the si bit, clears the interrupt ( int goes high) and allows the serial transfer to continue. when the slave address and the data direction bit have been transmitted and all the data bytes have been received, the serial interrupt ?ag (si) is set again, the interrupt line ( int) goes low again and i2csta is loaded with the following possible codes: ? 48h if a no acknowledgment bit (nack) has been received for the slave address with direction bit ? 50h when all the bytes have been received and an acknowledgement bit (ack) has been returned for all the bytes ? 58h when all the bytes have been received and an acknowledgement bit (ack) has been returned for all the bytes except the last one ? 38h if the pca9665 lost the arbitration ? b0h if the pca9665 lost the arbitration and is addressed as a slave transmitter (slave mode enabled with aa = 1) ? 68h if the pca9665 lost the arbitration and is addressed as a slave receiver (slave mode enabled with aa = 1) ? d8h if the pca9665 lost the arbitration and is addressed as a slave receiver during a general call sequence (slave mode enabled with aa = 1 and general call address enabled with gc = 1 in i2cadr register). the appropriate action to be taken for each of these status codes is detailed in t ab le 36 . ensio is not affected by the serial transfer and is not referred to in t ab le 36 . after a repeated start condition (state 10h), the pca9665 may switch to the master transmitter mode by loading i2cdat with sla+w. remark: a master should not transmit its own slave address.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 37 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller (1) see t ab le 28 . (2) no serial interrupt. (3) de?ned state when lb = 0 and the number of bytes received is equal to the value in i2ccount register. (4) de?ned state when lb = 1 and the number of bytes received is equal to the value in i2ccount register. (5) master transmitter byte mode is entered with mode = 0. master transmitter buffered mode is entered when mode = 1. fig 12. format and states in the master receiver buffered mode (mode = 1) 08h s sla r a data a p 50h f8h mr 10h s sla r w to master transmitter mode entry = mt (5) a p 48h f8h 002aab660 a 38h other mst continues a or a 38h other mst continues a other mst continues successful reception from a slave transmitter next transfer started with a repeated start condition not acknowledge received after the slave address arbitration lost in slave address or acknowledge bit arbitration lost and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master data a 58h (3) (4) b0h 68h to corresponding states in slave transmitter mode to corresponding states in slave receiver mode d8h to corresponding states in slave receiver mode (general call) (2) data a
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 38 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 36. master receiver buffered mode (mode = 1) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode 08h a start condition has been transmitted load sla+r 0 total number of bytes to be received x x 0 x 1 sla+r will be transmitted. if ack bit received, bc[6:0] data bytes will be received, ack bit will be returned for all of them. 1 total number of bytes to be received x x 0 x 1 sla+r will be transmitted. if ack bit received, bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned. 10h a repeated start condition has been transmitted load sla+r or 0 total number of bytes to be received x x 0 x 1 sla+r will be transmitted. if ack bit received, bc[6:0] data bytes will be received, ack bit will be returned for all of them. 1 total number of bytes to be received x x 0 x 1 sla+r will be transmitted. if ack bit received, bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned. load sla+w and the data bytes x total number of bytes to be transmitted (= sla+w + number of data bytes) x x 0 x 1 sla+w will be transmitted; pca9665 will be switched to master transmitter buffered mode. 38h arbitration lost in nack bit no i2cdat action or xx 0 0 0x1 i 2 c-bus will be released; pca9665 will enter slave mode. no i2cdat action x x 1 0 0 x 1 a start condition will be transmitted when the bus becomes free. 48h sla+r has been transmitted; nack has been received no i2cdat action or x x 1 0 0 x 1 repeated start condition will be transmitted. no i2cdat action or x x 0 1 0 x 1 stop condition will be transmitted; sto ?ag will be reset. no i2cdat action x x 1 1 0 x 1 stop condition followed by a start condition will be transmitted; sto ?ag will be reset.
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 39 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 50h bc[6:0] data bytes have been received; ack has been returned for all the bytes read data bytes or 0 total number of bytes to be received 0 0 0 x 1 bc[6:0] data bytes will be received, ack bit will be returned for all of them read data bytes or 1 total number of bytes to be received 0 0 0 x 1 bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned 58h bc[6:0] data bytes have been received; ack has been returned for all the bytes, except for the last one where nack bit has been returned read data bytes or x x 1 0 0 x 1 repeated start condition will be transmitted read data bytes or x x 0 1 0 x 1 stop condition will be transmitted; sto ?ag will be reset. read data bytes x x 1 1 0 x 1 stop condition followed by a start condition will be transmitted; sto ?ag will be reset. table 36. master receiver buffered mode (mode = 1) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 40 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.4.3 slave receiver buffered mode in the slave receiver buffered mode, a number of data bytes are received from a master transmitter several bytes at a time (see figure 13 ). to initiate the slave receiver byte mode, i2cadr and i2ccon must be loaded as shown in t ab le 37 and t ab le 38 . the upper 7 bits are the i 2 c-bus address to which pca9665 will respond when addressed by a master. gc is the control bit that allows the pca9665 to respond or not to the general call address (00h). when programmed to logic 1, the pca9665 will acknowledge the general call address. when programmed to logic 0, the pca9665 will not acknowledge the general call address. ensio must be set to logic 1 to enable the i 2 c-bus interface. the aa bit must be set to enable the pca9665 to acknowledge its own slave address; sta, sto, and si must be reset. when i2cadr and i2ccon have been initialized, the pca9665 waits until it is addressed by its own slave address followed by the data direction bit which must be 0 (w) to operate in the slave receiver mode. after its own slave address and the w bit have been received, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and i2csta is loaded with 60h. this status code is used to vector to an interrupt service routine, and the appropriate action to be taken is detailed in t ab le 40 . the slave receiver buffered mode may also be entered when: ? the arbitration is lost while the pca9665 is in the master mode. see status 68h and d8h. ? the general call address (00h) has been received (general call address enabled with gc = 1). see status d0h. appropriate actions to be taken from these status codes are also detailed in t ab le 40 . the byte count register (i2ccount) is programmed with the number of bytes that need to be sent in a single sequence (bc[6:0]) as shown in t ab le 39 . table 37. i2cadr initialization bit 7 6 5 4 3 2 1 0 symbol ad7 ad6 ad5 ad4 ad3 ad2 ad1 gc value own slave address x table 38. i2ccon initialization bit 7 6 5 4 3 2 1 0 symbol aa ensio sta sto si - - mode value 11000xx1 table 39. i2ccount programming bit 7 6 5 4 3 2 1 0 symbol lb bc6 bc5 bc4 bc3 bc2 bc1 bc0 value x number of bytes received in a single sequence (1 byte to 68 bytes)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 41 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller if the lb bit is reset (logic 0), the pca9665 will return an acknowledge for all the bytes that will be received. the maximum number of bytes that are received in a single sequence is de?ned by bc[6:0] in i2ccount register as shown in t ab le 39 . if the lb bit is set (logic 1) during a transfer, the pca9665 will return a not acknowledge (logic 1) on sda after receiving the last byte. if the aa bit is reset, the i 2 c-bus state machine does not respond to its own slave address. however, the i 2 c-bus is still monitored and address recognition may be resumed at any time by setting aa. this means that the aa bit may be used to temporarily isolate the pca9665 from the i 2 c-bus. (1) see t ab le 40 . (2) de?ned state when the number of bytes received is equal to the value in i2ccount register and lb = 0. (3) de?ned state when the number of bytes received is equal to the value in i2ccount register and lb = 1. (4) number of bytes received is lower than i2ccount. fig 13. format and states in the slave receiver buffered mode (mode = 1) s sla w a data a p or s 80h a0h a 68h 002aab661 reception of own slave address and one or more data bytes; all are acknowledged last data byte received is not acknowledged arbitration lost as mst and addressed as slave data a 80h p or s f8h a 88h on stop p or s f8h on stop general call = 00h a data a p or s e0h a0h a d8h data a e0h p or s a e8h reception of the general call address and one or more data bytes last data byte received is not acknowledged arbitration lost as mst and addressed as slave by general call s f8h on stop w (2) (2) (3) (2) (2) (3) p or s f8h on stop a data a data 60h d0h n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master (4) (4)
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 42 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 40. slave receiver buffered mode (mode = 1) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode 60h own sla+w has been received; ack has been returned no i2cdat action or 0 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them. no i2cdat action 1 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before). 68h arbitration lost in sla+r/w as master; own sla+w has been received; ack has been returned no i2cdat action or 0 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them. no i2cdat action 1 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before). d0h general call address (00h) has been received; ack has been returned. no i2cdat action or 0 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them. no i2cdat action 1 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before). d8h arbitration lost in sla = r/w as master; general call address has been received; ack bit has been returned. no i2cdat action or 0 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them. no i2cdat action 1 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before).
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 43 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 80h previously addressed with own slave address; bc[6:0] data bytes have been received; ack has been returned for all the bytes read data bytes or 0 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them. read data bytes 1 total number of bytes to be received x x 0 x 1 up to bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before). 88h previously addressed with own slave address; bc[6:0] data bytes have been received; ack has been returned for all the bytes, except for the last one where nack bit has been returned read data bytes or x x 0 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1. read data bytes or x x 0 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1. read data bytes or x x 1 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. read data bytes x x 1 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. e0h previously addressed with general call; bc[6:0] data bytes have been received; ack has been returned for all the bytes read data bytes or 0 total number of bytes to be received x x 0 x 1 bc[6:0] data bytes will be received, ack bit will be returned for all of them. read data bytes 1 total number of bytes to be received x x 0 x 1 bc[6:0] data bytes will be received, ack bit will be returned for all of them, except for the last one where nack bit will be returned (unless master transmitter sends a stop or repeated start condition before). table 40. slave receiver buffered mode (mode = 1) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 44 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller e8h previously addressed with general call; bc[6:0] data bytes have been received; ack has been returned for all the bytes, except for the last one where nack bit has been returned read data bytes or x x 0 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1 read data bytes or x x 0 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1 read data bytes or x x 1 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. read data bytes x x 1 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. a0h a stop condition or repeated start condition has been received while still addressed as slave receiver no i2cdat action or x x 0 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1 no i2cdat action or x x 0 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1 no i2cdat action or x x 1 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. no i2cdat action x x 1 x 0 1 1 switched to not addressed slave mode; own slave address will be recognized; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. table 40. slave receiver buffered mode (mode = 1) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 45 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.4.4 slave transmitter buffered mode in the slave transmitter buffered mode, a number of data bytes are transmitted to a master receiver several bytes at a time (see figure 14 ). data transfer is initialized as in the slave receiver buffered mode. when i2cadr and i2ccon have been initialized, the pca9665 waits until it is addressed by its own slave address followed by the data direction bit which must be 1 (r) for the pca9665 to operate in the slave transmitter mode. after its own slave address and the r bit have been received, the serial interrupt ?ag (si) is set, the interrupt line ( int) goes low and i2csta is loaded with a8h. this status code is used to vector to an interrupt service routine, and the appropriate action to be taken is detailed in t ab le 41 . the slave transmitter buffered mode may also be entered if arbitration is lost while the pca9665 is in the master mode. see state b0h and appropriate actions in t ab le 41 . the byte count register (i2ccount) is programmed with the number of bytes that need to be sent in a single sequence (bc[6:0]) as shown in t ab le 39 . lb bit is only used for the receiver buffered modes and can be programmed to either logic 0 or logic 1. if the aa bit is reset during a transfer, the pca9665 will transmit all the bytes of the transfer (values de?ned by bc[6:0]) and enter state c8h. the pca9665 is switched to the not addressed slave mode and will ignore the master receiver if it continues the transfer. thus the master receiver receives all 1s as serial data. while aa is reset, the pca9665 does not respond to its own slave address. however, the i 2 c-bus is still monitored, and address recognition may be resumed at any time by setting aa. this means that the aa bit may be used to temporarily isolate the pca9665 from the i 2 c-bus. (1) see t ab le 31 . (2) de?ned state when the number of bytes sent is equal to the value in i2ccount register. (3) de?ned state when a nack is received. the number of bytes transmitted is lower than or equal to the value in the i2ccount register. (4) de?ned state after the last byte has been transmitted and the pca9665 goes to the non-addressed mode (aa = 0) and an ack is received. the number of bytes that are transmitted is equal to the value in i2ccount register. fig 14. format and states in the slave transmitter buffered mode (mode = 1) s sla r a data a p or s b8h f8h 002aab662 reception of own slave address and transmission of one or more data bytes arbitration lost as mst and addressed as slave n this number (contained in i2csta) corresponds to a defined state of the i 2 c-bus. (1) data a any number of data bytes and their associated acknowledge bits from master to slave from slave to master data a c0h p or s f8h a c8h on stop on stop a b0h last data byte transmitted; switched to not addressed slave (aa bit in i2ccon = 0) all '1's (2) (3) (4) a8h
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 46 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 41. slave transmitter buffered mode (mode = 1) status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode a8h own sla+r has been received; ack has been returned load data bytes or x total number of data bytes to be transmitted x x 0 0 1 up to bc[6:0] bytes will be transmitted. pca9665 switches to the not addressed mode after bc[6:0] bytes have been transmitted. load data bytes x total number of data bytes to be transmitted x x 0 1 1 up to bc[6:0] bytes will be transmitted. b0h arbitration lost in sla+r/w as master; own sla+r has been received, ack has been returned load data bytes or x total number of data bytes to be transmitted x x 0 0 1 up to bc[6:0] bytes will be transmitted. pca9665 switches to the not addressed mode after bc[6:0] bytes have been transmitted load data bytes x total number of data bytes to be transmitted x x 0 1 1 up to bc[6:0] bytes will be transmitted. b8h bc[6:0] bytes in i2cdat have been transmitted; ack has been received load data bytes or x total number of data bytes to be transmitted x x 0 0 1 up to bc[6:0] bytes will be transmitted. pca9665 switches to the not addressed mode after bc[6:0] bytes have been transmitted load data bytes x total number of data bytes to be transmitted x x 0 1 1 up to bc[6:0] bytes will be transmitted. c0h up to bc[6:0] bytes in i2cdat have been transmitted; nack has been received no i2cdat action or x x 0 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address recognized if gc = 1 no i2cdat action or x x 0 x 0 1 1 switched to slave mode; own slave address will be recognized; general call address recognized if gc = 1 no i2cdat action or x x 1 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free no i2cdat action x x 1 x 0 1 1 switched to slave mode; own slave address will be recognized; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free
xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x x x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xx xx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx x x xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 47 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller c8h bc[6:0] bytes in i2cdat have been transmitted (aa = 0); ack has been received no i2cdat action or x x 0 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address recognized if gc = 1. no i2cdat action or x x 0 x 0 1 1 switched to slave mode; own slave address will be recognized; general call address recognized if gc = 1. no i2cdat action or x x 1 x 0 0 1 switched to not addressed slave mode; no recognition of own slave address; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. no i2cdat action x x 1 x 0 1 1 switched to slave mode; own slave address will be recognized; general call address will be recognized if gc = 1; a start condition will be transmitted when the bus becomes free. table 41. slave transmitter buffered mode (mode = 1) continued status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by the pca9665 to/from i2cdat to/from i2ccount to i2ccon lb bc[6:0] sta sto si aa mode
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 48 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.5 buffered mode examples 8.5.1 buffered master transmitter mode of operation 1. program the i2ccount register with the number of bytes that need to be sent to the i 2 c-bus (bc[6:0] has a value from 01h to 44h). lb bit is used for receiver mode only and can be set to 0 or 1. 2. load the data bytes in i2cdat buffer. the different bytes to be sent will be stored in the pca9665 buffer. there is no protection against writing over a buffers boundary. if more than 68 bytes are written to the buffer, the data at address 00h will be overwritten. the number of bytes that needs to be loaded in i2cdat is equal to bc[6:0] in the i2ccount register. the number of data bytes sent is equal to bc[6:0], therefore, if the number of data bytes loaded is greater than bc[6:0], the additional data will not be sent. if the number of data bytes written to the buffer is less than bc[6:0], the pca9665 will still send out bc[6:0] data bytes. 3. program i2ccon register to initiate the master transmitter buffered sequence. in master mode, if sta = 1, a start command is sent. an interrupt will be asserted and the si bit is set in the i2ccon register after the start has been sent. the i2csta register contains the status of the transmission. mode bit must be set to 1 each time a write to the i2ccon register is performed. 4. after reading the i2csta status register, the i2ccon is programmed with sta = 0. that clears the previous interrupt. if a start command has been previously sent, the ?rst byte loaded into the buffer and sent to the i 2 c-bus is interpreted as the i 2 c-bus address + r/ w operation. in transmitter mode, r/ w = 0 and the following bytes that are sent to the i 2 c-bus are interpreted as data bytes. 5. when the sequence has been executed, an interrupt is asserted and the si bit is set in the i2ccon register. the i2csta register contains the status of the transmission and the i2ccount register contains the number of bytes that have been sent to the i 2 c-bus as described in t ab le 42 . 6. more sequence (program i2ccount register, load data bytes in i2cdat buffer, write the i2ccon register to send the data to the i 2 c-bus, read the i2csta register when the sequence has been executed) can be performed as long as a stop or repeated start command has not been sent. master transmitter buffered mode ends when the i2ccount register is programmed with sto = 1. 8.5.2 buffered master receiver mode of operation 1. program the i2ccount register with the number of bytes that need to be read from a slave device in the i 2 c-bus (bc[6:0] has a value from 01h to 44h). lb bit is used in receiver mode to let the pca9665 know if the last byte received must be acknowledged or not. lb = 0: last received byte is acknowledged and another sequence can be executed. lb = 1: last received byte is not acknowledged. the last sequence before sending a stop or repeated start must be executed with lb = 1. 2. load the i 2 c-bus address + r/ w = 1 in i2cdat buffer.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 49 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 3. program i2ccon register to initiate the master receiver buffered sequence. in master mode, if sta = 1, a start command is sent. an interrupt will be asserted and the si bit is set in the i2ccon register after the start has been sent. the i2csta register contains the status of the transmission. mode bit must be set to 1 each time a write to the i2ccon register is performed. 4. after reading the i2csta status register, the i2ccon is programmed with sta = 0. that clears the previous interrupt. if a start command has been previously sent, the i 2 c-bus address + r/ w = 1 byte that has been loaded into the buffer is sent to the i 2 c-bus, the pca9665 then becomes a master receiver device and starts receiving data from the addressed slave device. remark: the pca9665 is already a master receiver device if a buffered sequence has been previously executed. 5. when the sequence has been executed, an interrupt is asserted and the si bit is set in the i2ccon register. the i2csta register contains the status of the transmission and the i2ccount register contains the number of bytes that have been received. i2cdat buffer contains all the data that has been received and can be read by the microcontroller. 6. more sequences (program the i2ccount register, write to the i2ccon register, read the i2csta register when sequence has been executed, read the i2cdat buffer) can be performed as long as a stop or a repeated start command has not been sent. to be able to end the reception, the last buffered sequence must be performed with lb = 1. master receiver buffered mode ends when the i2ccount register is programmed with sto = 1. 8.5.3 buffered slave transmitter mode 1. an interrupt is asserted and the si bit is set in the i2ccon register when the pca9665s own slave address has been detected on the i 2 c-bus (aa = 1, own slave address de?ned in the i2cadr register). in slave transmitter mode, r/ w=1. 2. program the i2ccount register with the number of bytes that need to be sent to the i 2 c-bus (bc[6:0] has a value from 01h to 44h). lb bit is used for receiver buffered mode only. 3. load the data bytes in i2cdat buffer. the different bytes to be sent will be stored in the pca9665 buffer. there is no protection against writing over a buffers boundary. if more than 68 bytes are written to the buffer, the data at address 00h will be overwritten. the number of bytes that needs to be loaded in i2cdat is equal to bc[6:0] in the i2ccount register. the number of data bytes sent is equal to bc[6:0], therefore, if the number of data bytes loaded is greater than bc[6:0], the additional data will not be sent. if the number of data bytes written to the buffer is less than bc[6:0], the pca9665 will still send out bc[6:0] data bytes. 4. the i2ccon is programmed to clear the previous interrupt. the bytes loaded into the buffer are sent to the i 2 c-bus. mode bits must be set to 1 each time a write to the i2ccon register is performed. 5. when the sequence has been executed (bc[6:0] bytes sent or the master sent a nack), an interrupt is asserted and the si bit is set in the i2ccon register. the i2csta register contains the status of the transmission and the i2ccount register contains the number of bytes that have been sent to the i 2 c-bus.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 50 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 6. more sequences (program i2ccount register, load data bytes in i2cdat buffer, write the i2ccon register to send the data to the i 2 c-bus, read the i2csta register when sequence has been executed) can be performed as long as the master acknowledges the bytes sent by the pca9665 and aa = 1. slave transmitter buffered mode ends when the i 2 c-bus master does not acknowledge a byte or when the pca9665 goes to non-addressed slave mode. 8.5.4 buffered slave receiver mode 1. an interrupt is asserted and the si bit is set in the i2ccon register when the pca9665s own slave address has been detected in the i 2 c-bus (aa = 1, own slave address de?ned in the i2cadr register). in slave receiver mode, r/ w=0. 2. program the i2ccount register with the number of bytes that needs to be read from a master device in the i 2 c-bus (bc[6:0] has a value from 01h to 44h). lb bit is used in receiver mode to let the pca9665 know if the last byte received must be acknowledged or not. lb = 0: last received byte is acknowledged and another sequence can be executed. lb = 1: last received byte is not acknowledged. 3. the i2ccon is programmed to clear the previous interrupt. the pca9665 receives data from the i 2 c-bus master. mode bit must be set to 1 each time a write to the i2ccon register is performed. 4. when the sequence has been executed (bc[6:0] bytes have been received or the master sent a stop or repeated start command), an interrupt is asserted and the si bit is set in the i2ccon register. the i2csta register contains the status of the transmission and the i2ccount register contains the number of bytes that have been received. i2cdat buffer contains all the data that has been received and can be read by the microcontroller. 5. more sequence (program the i2ccount register, write to the i2ccon register, read the i2cdat buffer) can be performed as long as a stop or a repeated start command has not been sent by the i 2 c-bus master. slave receiver buffered mode ends when the i 2 c-bus master sends a stop or repeated start command, or when the pca9665 does not acknowledge the received bytes any more. 8.5.5 example: read 128 bytes in two 64-byte sequences of an eeprom (i 2 c-bus address = a0h for write operations and a1h for read operations) starting at location 08h 1. program i2ccount = 02h (2 bytes to be sent): i 2 c-bus slave address and memory allocation. 2. write a0h (i 2 c-bus slave address and write command) and 08h (location) into the i2cdat register. 3. program i2ccon with sta = 1, sto = si = 0, mode = 1. C the pca9665 sends a start command C the pca9665 sends an interrupt, sets si = 1 and updates i2csta register C i2csta reads 08h 4. program i2ccon with sta = sto = si = 0, mode = 1. C i 2 c-bus slave address a0h, then eeprom sub address 08h is sent on the bus
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 51 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller C the scl line is held low by the pca9665 after the 2 bytes have been sent C the pca9665 sends an interrupt, sets si = 1 and updates i2csta register C i2csta reads 28h 5. program i2ccount = 40h (64 bytes to read and last byte acknowledged). 6. load i2cdat with a1h (i 2 c-bus slave address and read command). 7. program i2ccon with sta = 1, si = 0, mode = 1. C the pca9665 sends a restart command C an interrupt is asserted and the i2csta register is updated C the i2csta register reads 10h 8. program i2ccon with sta = sto = si = 0, mode = 1. C address a1h is sent followed by a read of 64 data bytes C the last data byte is acknowledged C the scl line is held low by the pca9665 after the data is read C the pca9665 sends an interrupt and updates i2csta register C i2csta reads 50h 9. the microcontroller reads the 64 data bytes from the pca9665. 10. program i2ccount = c0h (64 bytes and last byte is not acknowledged). 11. program i2ccon with sta = sto = si = 0, mode = 1. 12. the pca9665 reads 64 bytes and does not acknowledge the last byte. C the pca9665 sends an interrupt and updates i2csta register C the i2csta reads 58h C the scl line is held low by the pca9665 C the slave should release the sda line 13. the microcontroller reads the 64 bytes from the pca9665. 14. program i2ccon with si = sta = 0, st0 = 1, mode = x. C the pca9665 sends a stop condition C no interrupt is generated by the pca9665 C the i2csta register contains f8h 8.6 i2ccount register when a write to the i2ccount register is requested, the buffer pointer is reset and points at the ?rst byte. loading of the data in the i2cdat buffer then starts at the ?rst byte. once an operation has been performed (si = 1 and an interrupt is generated), the i2ccount register contains the number of bytes that have been received (receiver mode) or the number of bytes that have been sent (transmitter mode). see t ab le 42 for more information. in buffered transmitter mode, the ?rst byte that is sent to the i 2 c-bus is always the ?rst byte that has been loaded in the i2cdat buffer.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 52 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller in buffered receiver mode, when an interrupt is generated and si is set to 1 (after a stop command or a buffer full condition), the buffer pointer is reset and points at the ?rst received data byte. reading the i2ccount register then indicates the number of bytes that have been sent or received (bc[6:0]). reading of the data from i2cdat buffer can then be initiated starting with the ?rst received byte. table 42. i2ccount register value based on the performed operation operation performed i2ccount register value master transmitter buffered mode after start condition dont care after slave address sent + ack bit received and interrupt received 1 after slave address sent + nack bit received 1 after slave address sent + n data bytes sent, ack bit received, both address and n data n+1 after slave address sent + n data bytes sent, last byte n + 1 after stop dont care after losing arbitration in slave address + w and addressed as slave 0 after losing arbitration in slave address + w and not addressed as slave 0 after losing arbitration in data at n th byte n (if there was no interrupt after slave address was sent) n - 1 (if there was an interrupt after slave address was sent) master receiver buffered mode after start condition don't care after slave address sent + ack bit received don't care (because no interrupt received here) after slave address sent + nack bit received 1 after slave address sent + n data bytes received, ack bit received for address and ack bit returned for n data bytes n after slave address sent + n data bytes received, nack bit returned for the last byte n after stop don't care after losing arbitration in slave address + r bit and addressed as slave 0 after losing arbitration in slave address + r and not addressed as slave 0 after losing arbitration in ack of n th byte n slave receiver buffered mode (regular slave mode and general call response after slave address + w and ack bit returned for slave address (both in regular mode and when pca9665 loses arbitration and is addressed as slave) 0 after receiving n bytes, ack bit returned for the n bytes n after receiving n bytes, nack bit returned for the last byte n slave transmitter buffered mode after slave addres s + r and ack bit returned for slave address (both in regular mode and when pca9665 loses arbitration and is addressed as slave) 0 after n data bytes transmitted and ack bit received for n bytes n after n data bytes transmitted and nack bit received for the last byte n
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 53 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller remark: request to send or receive a number of bytes equal to 0 or higher than 68 (bc[6:0] = 000 0000 or bc[6:0] > 100 0100) will cause no data to be transferred and an interrupt to be generated after writing to the i2ccon register. i2csta status register is loaded with fch that indicates that an invalid value was requested to be loaded in i2ccount. 8.7 acknowledge management (i 2 c-bus addresses and data) in byte and buffered modes data acknowledge/not acknowledge management can be controlled on a byte basis (byte mode) or on a sequence basis (buffered mode). the pca9665 can be programmed to respond (ack) or not (nack) to two different i 2 c-bus addresses. t ab le 43 shows how this is performed based on the different control bits (aa, gc, lb and mode) and the different modes. [1] assumption is that data received follows the address (as de?ned in column address); valid for slave mode only. [2] unless the master sends a stop command before. table 43. own slave address, general call address, and data acknowledge management aa gc lb mode address data received [1] master mode: the pca9665 generates a start command and controls the i 2 c-bus 0 x x 0 not applicable data (each byte) = nack 1 x x 0 not applicable data (each byte) = ack x x 0 1 not applicable all the bytes (bc[6:0] bytes) = ack x x 1 1 not applicable all the bytes except the last one (bc[6:0] bytes - 1) = ack; last byte = nack slave mode: i 2 c-bus message starting with the pca9665s own slave address 0 x x 0 own address = nack data (each byte) = nack 1 x x 0 own address = ack data (each byte) = ack 0 x 0 1 own address = nack all the bytes ( bc[6:0] bytes) = ack 0 x 1 1 own address = nack all the bytes except the last one (bc[6:0] bytes - 1) = ack; last byte=nack [2] 1 x 0 1 own address = ack all the bytes ( bc[6:0] bytes) = ack 1 x 1 1 own address = ack all the bytes except the last one (bc[6:0] bytes - 1) = ack; last byte = nack [2] slave mode: i 2 c-bus message starting with the general call address x 0 x 0 gc address = nack data (each byte) = nack 0 1 x 0 gc address = ack data (each byte) = nack 1 1 x 0 gc address = ack data (each byte) = ack x 0 x 1 gc address = nack data (each byte) = nack x 1 0 1 gc address = ack all the bytes ( bc[6:0] bytes) = ack x 1 1 1 gc address = ack all the bytes except the last one (bc[6:0] bytes - 1) = ack; last byte = nack [2]
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 54 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 44. unbuffered mode (mode = 0) control bits lb = x aa = 0 master transmitter mode ? address/data are transmitted on a byte basis master receiver mode ? address is transmitted and data are received on a byte basis ? nack returned after one byte received slave transmitter mode ? nack returned after own slave address received ? switch to not addressed slave mode any time during an i 2 c-bus sequence slave receiver mode ? nack returned after own slave address received ? nack returned after one byte received aa = 1 master transmitter mode ? address/data are transmitted on a byte basis master receiver mode ? data are received on a byte basis ? ack returned after one byte received slave transmitter mode ? ack returned after own slave address received ? always addressed during an i 2 c-bus sequence slave receiver mode ? ack returned after own slave address received ? ack returned after one byte received
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 55 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller table 45. buffered mode (mode = 1) control bits lb=0 lb=1 aa = 0 master transmitter mode ? address/data are transmitted on a multiple byte basis = bc[6:0] value master receiver mode ? address is transmitted and data are received on a multiple byte basis = bc[6:0] value ? ack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) master transmitter mode ? address/data are transmitted on a multiple byte basis = bc[6:0] value master receiver mode ? address is transmitted and data are received on a multiple byte basis = bc[6:0] value ? nack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) slave transmitter mode ? nack returned after own slave address received ? in addressed mode, data are transmitted on a multiple byte basis = bc[6:0] value ? in addressed mode, switch to non addressed mode after the last byte of a buffered sequence is transmitted (after bytes sent = bc[6:0] value) slave receiver mode ? nack returned after own slave address received ? in addressed mode, data are received on a multiple byte basis = bc[6:0] value ? in addressed mode, ack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) ? in addressed mode, switch to non-addressed mode after the last byte of a buffered sequence is received (after bytes received = bc[6:0] value) slave transmitter mode ? nack returned after own slave address received ? in addressed mode, data are transmitted on a multiple byte basis = bc[6:0] value ? in addressed mode, switch to non addressed mode after the last byte of a buffered sequence is transmitted (after bytes sent = bc[6:0] value) slave receiver mode ? nack returned after own slave address received ? in addressed mode, data are received on a multiple byte basis = bc[6:0] value ? in addressed mode, nack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) ? in addressed mode, switch to non-addressed mode after the last byte of a buffered sequence is received (after bytes received = bc[6:0] value)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 56 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller aa = 1 master transmitter mode ? address/data are transmitted on a multiple byte basis = bc[6:0] value master receiver mode ? address is transmitted and data are received on a multiple byte basis = bc[6:0] value ? ack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) master transmitter mode ? address/data are transmitted on a multiple byte basis = bc[6:0] value master receiver mode ? address is transmitted and data are received on a multiple byte basis = bc[6:0] value ? nack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) slave transmitter mode ? ack returned after own slave address received ? in addressed mode, data are transmitted on a multiple byte basis = bc[6:0] value ? always addressed during a buffered sequence slave receiver mode ? ack returned after own slave address received ? in addressed mode, data are received on a multiple byte basis = bc[6:0] value ? in addressed mode, ack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) slave transmitter mode ? ack returned after own slave address received ? in addressed mode, data are transmitted on a multiple byte basis = bc[6:0] value ? always addressed during a buffered sequence slave receiver mode ? ack returned after own slave address received ? in addressed mode, data are received on a multiple byte basis = bc[6:0] value ? in addressed mode, nack returned after the last byte of a buffered sequence received (after bytes received = bc[6:0] value) table 45. buffered mode (mode = 1) continued control bits lb=0 lb=1
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 57 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.8 miscellaneous states there are four i2csta codes that do not correspond to a de?ned pca9665 state (see t ab le 46 ). these are discussed in section 8.8.1 through section 8.8.4 . 8.8.1 i2csta = f8h this status code indicates that the pca9665 is in an idle state and that no relevant information is available because the serial interrupt ?ag, si, is not yet set. this occurs on a stop condition or during a hardware or software reset event and when the pca9665 is not involved in a serial transfer. 8.8.2 i2csta = 00h this status code indicates that a bus error has occurred during a serial transfer. a bus error is caused when a start or stop condition occurs at an illegal position in the format frame. examples of such illegal positions are during the serial transfer of an address byte, a data byte, or an acknowledge bit. a bus error may also be caused when external interference disturbs the internal pca9665 signals. when a bus error occurs, si is set. to recover from a bus error, the microcontroller must send an external hardware or software reset signal to reset the pca9665. 8.8.3 i2csta = 70h this status code indicates that the sda line is stuck low when the pca9665, in master mode, is trying to send a start condition. table 46. miscellaneous states status code (i2csta) status of the i 2 c-bus and the pca9665 application software response next action taken by pca9665 to/from i2cdat to i2ccon sta sto si aa mode f8h on hardware or software reset or stop no i2cdat action 1 x 0 x x go into master mode; send start no i2cdat action 0 x 0 0 x no recognition of own slave address. general call address will be recognized if gc = 1. no i2cdat action 0 x 0 1 x will recognize own slave address. general call address will be recognized if gc = 1. 70h bus error sda stuck low no i2cdat action no i2ccon action hardware or software reset of the pca9665 (requires reset to return to state f8h) 78h bus error scl stuck low no i2cdat action no i2ccon action hardware or software reset of the pca9665 (requires reset to return to state f8h) fch illegal value in i2ccount no i2cdat action no i2ccon action program a valid value in i2ccount: bc[6:0] between 1 and 68. 00h bus error during master or slave mode, due to illegal start or stop condition no i2cdat action no i2ccon action hardware or software reset of the pca9665 (requires reset to return to state f8h)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 58 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.8.4 i2csta = 78h this status code indicates that the scl line is stuck low. 8.9 some special cases the pca9665 has facilities to handle the following special cases that may occur during a serial transfer. 8.9.1 simultaneous repeated start conditions from two masters a repeated start condition may be generated in the master transmitter or master receiver modes. a special case occurs if another master simultaneously generates a repeated start condition (see figure 15 ). until this occurs, arbitration is not lost by either master since they were both transmitting the same data. if the pca9665 detects a repeated start condition on the i 2 c-bus before generating a repeated start condition itself, it will use the repeated start as its own and continue with the sending of the slave address. 8.9.2 data transfer after loss of arbitration arbitration may be lost in the master transmitter and master receiver modes. loss of arbitration is indicated by the following states in i2csta; 38h, 68h, and b0h (see figure 7 , figure 11 , figure 8 , and figure 12 ). remark: in order to exit state 38h, a time-out, reset, or external stop are required. if the sta ?ag in i2ccon is set by the routines which service these states, then, if the bus is free again, a start condition (state 08h) is transmitted without intervention by the cpu, and a retry of the total serial transfer can commence. 8.9.3 forced access to the i 2 c-bus in some applications, it may be possible for an uncontrolled source to cause a bus hang-up. in such situations, the problem may be caused by interference, temporary interruption of the bus or a temporary short-circuit between sda and scl. if an uncontrolled source generates a super?uous start or masks a stop condition, then the i 2 c-bus stays busy inde?nitely. if the sta ?ag is set and bus access is not obtained within a reasonable amount of time, then a forced access to the i 2 c-bus is possible. if the i 2 c-bus stays idle for a time period equal to the time-out period, then the pca9665 concludes that no other master is using the bus and sends a start condition. fig 15. simultaneous repeated start conditions from 2 masters s sla w a data a 18h 28h 002aab028 other master sends repeated start condition earlier 08h s both masters continue with sla transmission
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 59 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.9.4 i 2 c-bus obstructed by a low level on scl or sda an i 2 c-bus hang-up occurs if sda or scl is pulled low by an uncontrolled source. if the scl line is obstructed (pulled low) by a device on the bus, no further serial transfer is possible, and the pca9665 cannot resolve this type of problem. when this occurs, the problem must be resolved by the device that is pulling the scl bus line low. when the scl line stays low for a period equal to the time-out value, the pca9665 concludes that this is a bus error and behaves in a manner described in section 7.3.2.4 the time-out register , i2ct o (indirect address 04h) . if the sda line is obstructed by another device on the bus (e.g., a slave device out of bit synchronization), the problem can be solved by transmitting additional clock pulses on the scl line (see figure 17 ). the pca9665 sends out nine clock pulses followed by the stop condition. if the sda line is released by the slave pulling it low, a normal start condition is transmitted by the pca9665, state 08h is entered and the serial transfer continues. if the sda line is not released by the slave pulling it low, then the pca9665 concludes that there is a bus error, loads 70h in i2csta, generates an interrupt signal, and releases the scl and sda lines. after the microcontroller reads the status register, it needs to send a reset signal (hardware through the reset pin, or software through the parallel port) in order to reset the pca9665. see section 8.11 reset for more information. if a forced bus access occurs or a repeated start condition is transmitted while sda is obstructed (pulled low), the pca9665 performs the same action as described above. in each case, state 08h is entered after a successful start condition is transmitted and normal serial transfer continues. note that the cpu is not involved in solving these bus hang-up problems. fig 16. forced access to a busy i 2 c-bus sta flag sda line scl line time-out start condition 002aab029
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 60 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.9.5 bus error a bus error occurs when a start or stop condition is present at an illegal position in the format frame. examples of illegal positions are during the serial transfer of an address byte, a data or an acknowledge bit. the pca9665 only reacts to a bus error when it is involved in a serial transfer either as a master or an addressed slave. when a bus error is detected, pca9665 releases the sda and scl lines, sets the interrupt ?ag, and loads the status register with 00h. this status code may be used to vector to a service routine which either attempts the aborted serial transfer again or simply recovers from the error condition as shown in t ab le 46 miscellaneous states . the microcontroller must send an external hardware or software reset signal to reset the pca9665. 8.10 power-on reset when power is applied to v dd , an internal power-on reset holds the pca9665 in a reset condition until v dd has reached v por . at this point, the reset condition is released and the pca9665 goes to the power-up initialization phase where the following operations are performed: 1. ensio bit is set to 1 to enable the internal oscillator. 2. internal register initialization is performed. 3. ensio bit is set to 0 to disable the internal oscillator and go to the non-addressed low power mode. the complete power-up initialization phase takes 550 m s to be performed. during this time, write to the pca9665 through the parallel port is not permitted. however, the parallel port can be read. this allows the device connected to the parallel port of the pca9665 to poll the i2ccon register and read the ensio state bit. when ensio bit is equal to 1, this means that the power-up initialization is in progress. when ensio is set to 0, this means that the power-up initialization is done and that the pca9665 is initialized and ready to be used. fig 17. recovering from a bus obstruction caused by a low level on sda 123456789 002aab030 stop condition start condition sta flag sda line scl line
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 61 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.11 reset reset of the pca9665 to its default state can be performed in 2 different ways: ? by holding the reset pin low for a minimum of t w(rst) . ? by using the parallel software reset sequence as described in figure 18 . 8.12 i 2 c-bus timing diagrams, unbuffered mode the diagrams ( figure 19 through figure 22 ) illustrate typical timing diagrams for the pca9665 in master/slave functions. fig 18. parallel software reset sequence 002aab966 a[1:0] 00 10 access to indptr indirect register pointer access to the indirect indirect data field d[7:0] 05h i2cpreset register selected a5h swrst data byte 1 5ah swrst data byte 2 wr if d[7:0] 1 a5h, following byte is ignored and reset is aborted. if d[7:0] 1 5ah, reset is aborted. if swrst data 1 = a5h and swrst data 2 = 5ah, pca9665 is reset to its default state. internal reset signal master pca9665 writes data to slave transmitter. fig 19. bus timing diagram; unbuffered master transmitter mode n byte ack scl sda int start condition 7-bit address r/w = 0 interrupt from slave receiver first byte ack ack interrupt stop condition 002aab031 interrupt
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 62 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller master pca9665 reads data from slave transmitter. fig 20. bus timing diagram; unbuffered master receiver mode n byte ack scl sda int start condition 7-bit address r/w = 1 interrupt from slave first byte ack no ack interrupt stop condition 002aab032 from master receiver external master receiver reads data from pca9665. (1) as de?ned in i2cadr register. fig 21. bus timing diagram; unbuffered slave transmitter mode n byte ack scl sda int start condition 7-bit address (1) r/w = 1 interrupt from slave pca9665 first byte ack no ack interrupt stop condition 002aab033 from master receiver interrupt slave pca9665 is written to by external master transmitter. (1) as de?ned in i2cadr register. fig 22. bus timing diagram; unbuffered slave receiver mode n byte ack scl sda int start condition 7-bit address (1) r/w = 0 interrupt from slave pca9665 first byte ack ack interrupt stop condition 002aab034 interrupt interrupt (after stop)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 63 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 8.13 i 2 c-bus timing diagrams, buffered mode the diagrams ( figure 23 through figure 26 ) illustrate typical timing diagrams for the pca9665 in master/slave functions. master pca9665 writes data to slave transmitter. (1) 7-bit address + r/ w = 0 byte and number of bytes sent = value programmed in i2ccount register (bc[6:0] 68). fig 23. bus timing diagram; buffered master transmitter mode n byte (1) ack scl sda int start condition 7-bit address (1) r/w = 0 from slave receiver first byte (1) ack ack stop condition 002aab267 interrupt master pca9665 reads data from slave transmitter. (1) number of bytes received = value programmed in i2ccount register (bc[6:0] 68). fig 24. bus timing diagram; buffered master receiver mode n byte (1) ack scl sda int start condition 7-bit address r/w = 1 from slave first byte (1) ack no ack stop condition 002aab268 from master receiver
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 64 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller external master receiver reads data from pca9665. (1) as de?ned in i2cadr register. (2) number of bytes received = value programmed in i2ccount register (bc[6:0] 68). fig 25. bus timing diagram; buffered slave transmitter mode n byte (2) ack scl sda int start condition 7-bit address (1) r/w = 1 from slave pca9665 first byte (2) ack no ack stop condition 002aab269 from master receiver interrupt interrupt slave pca9665 is written to by external master transmitter. (1) as de?ned in i2cadr register. (2) number of bytes received = value programmed in i2ccount register (bc[6:0] 68). fig 26. bus timing diagram; buffered slave receiver mode n byte (2) ack scl sda int start condition 7-bit address (1) r/w = 0 from slave pca9665 first byte (2) ack ack stop condition 002aab270 interrupt interrupt (after stop) interrupt fig 27. bus timing diagram; software reset call ack scl sda int start condition 7-bit swrst call address r/w = 0 from slave pca9665 first byte = 0xa5 ack stop condition 002aab488 interrupt (after stop) interrupt second byte = 0x5a ack
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 65 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 9. characteristics of the i 2 c-bus the i 2 c-bus is for 2-way, 2-line communication between different ics or modules. the two lines are a serial data line (sda) and a serial clock line (scl). both lines must be connected to a positive supply via a pull-up resistor when connected to the output stages of a device. data transfer may be initiated only when the bus is not busy. 9.1 bit transfer one data bit is transferred during each clock pulse. the data on the sda line must remain stable during the high period of the clock pulse as changes in the data line at this time will be interpreted as control signals (see figure 28 ). 9.1.1 start and stop conditions both data and clock lines remain high when the bus is not busy. a high-to-low transition of the data line while the clock is high is de?ned as the start condition (s). a low-to-high transition of the data line while the clock is high is de?ned as the stop condition (p) (see figure 29 ). 9.2 system con?guration a device generating a message is a transmitter; a device receiving is the receiver. the device that controls the message is the master and the devices which are controlled by the master are the slaves (see figure 30 ). fig 28. bit transfer mba607 data line stable; data valid change of data allowed sda scl fig 29. de?nition of start and stop conditions mba608 sda scl p stop condition sda scl s start condition
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 66 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 9.3 acknowledge the number of data bytes transferred between the start and the stop conditions from transmitter to receiver is not limited. each byte of eight bits is followed by one acknowledge bit. the acknowledge bit is a high level put on the bus by the transmitter, whereas the master generates an extra acknowledge related clock pulse. a slave receiver which is addressed must generate an acknowledge after the reception of each byte. also a master must generate an acknowledge after the reception of each byte that has been clocked out of the slave transmitter. the device that acknowledges has to pull down the sda line during the acknowledge clock pulse, so that the sda line is stable low during the high period of the acknowledge related clock pulse; set-up and hold times must be taken into account. a master receiver must signal an end of data to the transmitter by not generating an acknowledge on the last byte that has been clocked out of the slave. in this event, the transmitter must leave the data line high to enable the master to generate a stop condition. fig 30. system con?guration 002aaa966 master transmitter/ receiver slave receiver slave transmitter/ receiver master transmitter master transmitter/ receiver sda scl i 2 c-bus multiplexer slave fig 31. acknowledgement on the i 2 c-bus 002aaa987 s start condition 9 8 2 1 clock pulse for acknowledgement not acknowledge acknowledge data output by transmitter data output by receiver scl from master
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 67 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 10. application design-in information 10.1 speci?c applications the pca9665 is a parallel bus to i 2 c-bus controller that is designed to allow smart devices to interface with i 2 c-bus or smbus components, where the smart device does not have an integrated i 2 c-bus port and the designer does not want to bit-bang the i 2 c-bus port. the pca9665 can also be used to add more i 2 c-bus ports to smart devices, provide a higher frequency, lower voltage migration path for the pcf8584 and convert 8 bits of parallel data to a serial bus to avoid running multiple traces across the printed-circuit board. 10.2 add i 2 c-bus port as shown in figure 33 , the pca9665 converts 8-bits of parallel data into a multiple master capable i 2 c-bus port for microcontrollers, microprocessors, custom asics, dsps, etc., that need to interface with i 2 c-bus or smbus components. fig 32. application diagram using the 80c51 002aab035 pca9665 80c51 decoder d0 to d7 ale ce rd wr int a0 scl sda a1 reset slave int reset address bus v dd v dd 8 v ss v dd v dd v dd v ss slave
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 68 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 10.3 add additional i 2 c-bus ports the pca9665 can be used to convert 8-bit parallel data into additional multiple master capable i 2 c-bus port as shown in figure 34 . it is used if the microcontroller, microprocessor, custom asic, dsp, etc., already have an i 2 c-bus port but need one or more additional i 2 c-bus ports to interface with more i 2 c-bus or smbus components or components that cannot be located on the same bus (e.g., 100 khz and 400 khz slaves on different buses so that each bus can operate at its maximum potential). 10.4 convert 8 bits of parallel data into i 2 c-bus serial data stream functioning as a slave transmitter, the pca9665 can convert 8-bit parallel data into a two-wire i 2 c-bus data stream as is shown in figure 35 . this would prevent having to run 8 traces across the entire width of the printed-circuit board. fig 33. adding i 2 c-bus port application microcontroller, microprocessor, or asic control signals 8 bits data pca9665 sda scl 002aab036 fig 34. adding additional i 2 c-bus ports application microcontroller, microprocessor, or asic control signals 8 bits data pca9665 sda scl 002aab037 sda scl fig 35. converting parallel to serial data application control signals 8 bits data pca9665 sda scl 002aab039 master microcontroller, microprocessor, or asic
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 69 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 11. limiting values [1] 5.5 v steady state voltage tolerance on inputs and outputs is valid only when the supply voltage is present. 4.6 v steady stat e voltage tolerance on inputs and outputs when no supply voltage is present. table 47. limiting values in accordance with the absolute maximum rating system (iec 60134). symbol parameter conditions min max unit v dd supply voltage - 0.3 +4.6 v v i input voltage any input [1] - 0.8 +6.0 v i i input current any input - 10 +10 ma i o output current any output - 10 +10 ma p tot total power dissipation - 300 mw p/out power dissipation per output - 50 mw t stg storage temperature - 65 +150 c t amb ambient temperature operating - 40 +85 c
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 70 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 12. static characteristics [1] 5.5 v steady state voltage tolerance on inputs and outputs is valid only when the supply voltage is present. 4.6 v steady stat e voltage tolerance on inputs and outputs when no supply voltage is present. table 48. static characteristics v dd = 2.3 v to 3.6 v; t amb = - 40 c to +85 c; unless otherwise speci?ed. symbol parameter conditions min typ max unit supply v dd supply voltage 2.3 - 3.6 v i dd supply current standby mode - 0.1 3.0 ma operating mode; no load - - 8.0 ma v por power-on reset voltage - 1.8 2.2 v inputs wr, rd, a0, a1, ce, reset v il low-level input voltage 0 - 0.8 v v ih high-level input voltage [1] 2.0 - 5.5 v i l leakage current input; v i = 0 v or 5.5 v - 1-+1 m a c i input capacitance v i =v ss or v dd - 2.0 3 pf inputs/outputs d0 to d7 v il low-level input voltage 0 - 0.8 v v ih high-level input voltage [1] 2.0 - 5.5 v i oh high-level output current v oh =v dd - 0.4 v - 4.0 - 7.0 - ma i ol low-level output current v ol = 0.4 v 4.0 8.0 - ma i l leakage current input; v i = 0 v or 5.5 v - 1-+1 m a c io input/output capacitance v i =v ss or v dd - 2.8 4 pf sda and scl v il low-level input voltage 0 - 0.3v dd v v ih high-level input voltage [1] 0.7v dd - 5.5 v i l leakage current input/output; v i = 0 v or 3.6 v - 1-+1 m a input/output; v i = 5.5 v - 1 - +10 m a i ol low-level output current v ol = 0.4 v 20 - - ma c io input/output capacitance v i =v ss or v dd - 5.6 7 pf outputs int i ol low-level output current v ol = 0.4 v 6.0 - - ma i l leakage current v o = 0 v or 3.6 v - 1-+1 m a c o output capacitance v i =v ss or v dd - 3.8 5 pf
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 71 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 13. dynamic characteristics [1] parameters are valid over speci?ed temperature and voltage range. [2] all voltage measurements are referenced to ground (gnd). for testing, all inputs swing between 0 v and 3.0 v with a transition time of 5 ns maximum. all time measurements are referenced at input voltages of 1.5 v and output voltages shown in figure 38 and figure 40 . [3] test conditions for outputs: c l = 50 pf; r l = 500 w , except open-drain outputs. test conditions for open-drain outputs: c l = 50 pf; r l =1k w pull-up to v dd . [4] initialization time for the serial interface after ensio bit goes high in a write operation to the control register. [5] resetting the device while actively communicating on the bus may cause glitches or an errant stop condition. [6] upon reset, the full delay will be the sum of t rst and the rc time constant of the sda and scl bus. table 49. dynamic characteristics (3.3 volt) [1] [2] [3] v cc = 3.3 v 0.3 v; t amb = - 40 c to +85 c; unless otherwise speci?ed. (see t ab le 50 on page 72 for 2.5 v) symbol parameter conditions min typ max unit initialization timing t init(po) power-on initialization time - - 550 m s serial interface initialization timing t init(sintf) serial interface initialization time [4] from ensio bit high - - 550 m s reset timing (see figure 36 ) t w(rst) reset pulse width 10 - - ns t rst reset time [5] [6] 250 - - ns t rec(rst) reset recovery time 0 - - ns int timing (see figure 37 ) t as(int) interrupt assert time - - 500 ns t das(int) interrupt de-assert time - - 20 ns bus timing (see figure 38 and figure 40 ) t su(a) address setup time to rd, wr low 0 - - ns t h(a) address hold time from rd, wr low 13 - - ns t su(ce_n) ce setup time to rd, wr low 0 - - ns t h(ce_n) ce hold time from rd, wr low 0 - - ns t w(rdl) rd low pulse width 20 - - ns t w(wrl) wr low pulse width 20 - - ns t d(dv) data valid delay time after rd and ce low - - 17 ns t d(qz) data output ?oat delay time after rd or ce high - - 17 ns t su(q) data output setup time before wr or ce high (write cycle) 12 - - ns t h(q) data output hold time after wr high 0 - - ns t w(rdh) rd high pulse width 18 - - ns t w(wrh) wr high pulse width 18 - - ns
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 72 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller [1] parameters are valid over speci?ed temperature and voltage range. [2] all voltage measurements are referenced to ground (gnd). for testing, all inputs swing between 0 v and 3.0 v with a transition time of 5 ns maximum. all time measurements are referenced at input voltages of 1.5 v and output voltages shown in figure 38 and figure 40 . [3] test conditions for outputs: c l = 50 pf; r l = 500 w , except open-drain outputs. test conditions for open-drain outputs: c l = 50 pf; r l =1k w pull-up to v dd . [4] initialization time for the serial interface after ensio bit goes high in a write operation to the control register. [5] resetting the device while actively communicating on the bus may cause glitches or an errant stop condition. [6] upon reset, the full delay will be the sum of t rst and the rc time constant of the sda and scl bus. table 50. dynamic characteristics (2.5 volt) [1] [2] [3] v cc = 2.5 v 0.2 v; t amb = - 40 c to +85 c; unless otherwise speci?ed. (see t ab le 49 on page 71 for 3.3 v) symbol parameter conditions min typ max unit initialization timing t init(po) power-on initialization time - - 550 m s serial interface initialization timing t init(sintf) serial interface initialization time [4] from ensio bit high - - 550 m s reset timing (see figure 36 ) t w(rst) reset pulse width 10 - - ns t rst reset time [5] [6] 250 - - ns t rec(rst) reset recovery time 0 - - ns int timing (see figure 37 ) t as(int) interrupt assert time - - 550 ns t das(int) interrupt de-assert time - - 20 ns bus timing (see figure 38 and figure 40 ) t su(a) address setup time to rd, wr low 0 - - ns t h(a) address hold time from rd, wr low 13 - - ns t su(ce_n) ce setup time to rd, wr low 0 - - ns t h(ce_n) ce hold time from rd, wr low 0 - - ns t w(rdl) rd low pulse width 20 - - ns t w(wrl) wr low pulse width 20 - - ns t d(dv) data valid delay time after rd and ce low - - 22 ns t d(qz) data output ?oat delay time after rd or ce high - - 17 ns t su(q) data output setup time before wr or ce high (write cycle) 12 - - ns t h(q) data output hold time after wr high 0 - - ns t w(rdh) rd high pulse width 18 - - ns t w(wrh) wr high pulse width 18 - - ns
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 73 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 36. reset timing sda scl 002aab272 t rst 50 % 30 % 50 % 50 % 30 % t rec(rst) t w(rst) reset dn dn off start t rst ack or read cycle 30 % dn on 30 % fig 37. interrupt timing 6789 002aac227 d7 to d0 wr scl int t as(int) write to i2ccon 123 t das(int)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 74 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 38. bus timing (read cycle) fig 39. parallel bus timing (write cycle) a0 to a1 ce rd d0 to d7 (read) 002aac693 t su(a) t h(a) t su(ce_n) t h(ce_n) t w(rdl) t w(rdh) float float not valid valid t d(dv) t d(qz) a0 to a1 ce 002aac692 t su(a) t h(a) t su(ce_n) t h(ce_n) wr valid t w(wrh) d0 to d7 (write) t su(q) t h(q) t w(wrl)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 75 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller v m = 1.5 v v x =v ol + 0.3 v v y =v oh - 0.3 v v ol and v oh are typical output voltage drops that occur with the output load. fig 40. data timing 002aab274 t d(qlz) t d(qhz) outputs floating outputs enabled outputs enabled dn output low-to-float float-to-low dn output high-to-float float-to-high rd, ce input v i v ol v oh v dd v m v m v x v y v m gnd gnd t d(qzl) t d(qzh) v m
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 76 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller [1] minimum scl clock frequency is limited by the bus time-out feature, which resets the serial bus interface if either sda or s cl is held low for a minimum of 25 ms. disable bus time-out feature for dc operation. [2] t vd;ack = time for acknowledgement signal from scl low to sda (out) low. [3] t vd;dat = minimum time for sda data out to be valid following scl low. [4] c b = total capacitance of one bus line in pf. [5] a master device must internally provide a hold time of at least 300 ns for the sda signal (refer to the v il of the scl signal) in order to bridge the unde?ned region scls falling edge. [6] the maximum t f for the sda and scl bus lines is speci?ed at 300 ns. the maximum fall time for the sda output stage t f is speci?ed at 250 ns. this allows series protection resistors to be connected between the sda and the scl pins and the sda/scl bus lines witho ut exceeding the maximum speci?ed t f . [7] input ?lters on the sda and scl inputs suppress noise spikes less than 50 ns. table 51. i 2 c-bus frequency and timing speci?cations all the timing limits are valid within the operating supply voltage and ambient temperature range; v dd = 2.5 v 0.2 v and 3.3 v 0.3 v; t amb = - 40 c to +85 c; and refer to v il and v ih with an input voltage of v ss to v dd . symbol parameter conditions standard-mode i 2 c-bus fast-mode i 2 c-bus fast-mode plus i 2 c-bus unit min max min max min max f scl scl clock frequency [1] 0 100 0 400 0 1000 khz t buf bus free time between a stop and start condition 4.7 - 1.3 - 0.5 - m s t hd;sta hold time (repeated) start condition 4.0 - 0.6 - 0.26 - m s t su;sta set-up time for a repeated start condition 4.7 - 0.6 - 0.26 - m s t su;sto set-up time for stop condition 4.0 - 0.6 - 0.26 - m s t hd;dat data hold time 0 - 0 - 0 - ns t vd;ack data valid acknowledge time [2] 0.05 3.45 0.05 0.9 0.05 0.45 m s t vd;dat data valid time [3] 50 - 50 - 50 - ns t su;dat data set-up time 250 - 100 - 50 - ns t low low period of the scl clock 4.7 - 1.3 - 0.5 - m s t high high period of the scl clock 4.0 - 0.6 - 0.26 - m s t f fall time of both sda and scl signals [5] [6] - 300 20 + 0.1c b [4] 300 - 120 ns t r rise time of both sda and scl signals - 1000 20 + 0.1c b [4] 300 - 120 ns t sp pulse width of spikes that must be suppressed by the input ?lter [7] - 50 - 50 - 50 ns
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 77 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 41. de?nition of timing on the i 2 c-bus sda scl 002aab271 t f s sr p s t hd;sta t low t r t su;dat t f t hd;dat t high t su;sta t hd;sta t sp t su;sto t r t buf rise and fall times refer to v il and v ih . fig 42. i 2 c-bus timing diagram scl sda t hd;sta t su;dat t hd;dat t f t buf t su;sta t low t high t vd;ack 002aac696 protocol start condition (s) bit 7 msb bit 6 bit n bit 0 acknowledge (a) 1 /f scl t r t vd;dat t su;sto stop condition (p)
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 78 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 14. test information test data are given in t ab le 52 . r l = load resistance. c l = load capacitance includes jig and probe capacitance. r t = termination resistance should be equal to the output impedance z o of the pulse generators. fig 43. test circuitry for switching times table 52. test data test load s1 c l r l t d(dv) 50 pf 500 w v dd 2 t d(qz) 50 pf 500 w open test data are given in t ab le 53 . r l = load resistance. r l for sda and scl > 1 k w (3 ma or less current). c l = load capacitance includes jig and probe capacitance. r t = termination resistance should be equal to the output impedance z o of the pulse generators. fig 44. test circuitry for open-drain switching times table 53. test data test load s1 c l r l t d(dv) 50 pf 1 k w v dd t d(qz) 50 pf 1 k w v dd t as(int) 50 pf 1 k w v dd t das(int) 50 pf 1 k w v dd pulse generator v o c l 50 pf r l 500 w 002aac694 r t v i v dd dut r l 500 w v dd 2 open v ss pulse generator v o c l 50 pf r l 1 k w 002aac695 r t v i v dd dut v dd open v ss
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 79 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 15. package outline fig 45. package outline sot146-1 (dip20) unit a max. 1 2 b 1 cd e e m h l references outline version european projection issue date iec jedec jeita mm inches dimensions (inch dimensions are derived from the original mm dimensions) sot146-1 99-12-27 03-02-13 a min. a max. b z max. w m e e 1 1.73 1.30 0.53 0.38 0.36 0.23 26.92 26.54 6.40 6.22 3.60 3.05 0.254 2.54 7.62 8.25 7.80 10.0 8.3 2 4.2 0.51 3.2 0.068 0.051 0.021 0.015 0.014 0.009 1.060 1.045 0.25 0.24 0.14 0.12 0.01 0.1 0.3 0.32 0.31 0.39 0.33 0.078 0.17 0.02 0.13 sc-603 ms-001 m h c (e ) 1 m e a l seating plane a 1 w m b 1 e d a 2 z 20 1 11 10 b e pin 1 index 0 5 10 mm scale note 1. plastic or metal protrusions of 0.25 mm (0.01 inch) maximum per side are not included. (1) (1) (1) dip20: plastic dual in-line package; 20 leads (300 mil) sot146-1
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 80 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 46. package outline sot163-1 (so20) unit a max. a 1 a 2 a 3 b p cd (1) e (1) (1) eh e ll p q z y w v q references outline version european projection issue date iec jedec jeita mm inches 2.65 0.3 0.1 2.45 2.25 0.49 0.36 0.32 0.23 13.0 12.6 7.6 7.4 1.27 10.65 10.00 1.1 1.0 0.9 0.4 8 0 o o 0.25 0.1 dimensions (inch dimensions are derived from the original mm dimensions) note 1. plastic or metal protrusions of 0.15 mm (0.006 inch) maximum per side are not included. 1.1 0.4 sot163-1 10 20 w m b p detail x z e 11 1 d y 0.25 075e04 ms-013 pin 1 index 0.1 0.012 0.004 0.096 0.089 0.019 0.014 0.013 0.009 0.51 0.49 0.30 0.29 0.05 1.4 0.055 0.419 0.394 0.043 0.039 0.035 0.016 0.01 0.25 0.01 0.004 0.043 0.016 0.01 0 5 10 mm scale x q a a 1 a 2 h e l p q e c l v m a (a ) 3 a so20: plastic small outline package; 20 leads; body width 7.5 mm sot163-1 99-12-27 03-02-19
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 81 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 47. package outline sot360-1 (tssop20) unit a 1 a 2 a 3 b p cd (1) e (2) (1) eh e ll p qz y w v q references outline version european projection issue date iec jedec jeita mm 0.15 0.05 0.95 0.80 0.30 0.19 0.2 0.1 6.6 6.4 4.5 4.3 0.65 6.6 6.2 0.4 0.3 0.5 0.2 8 0 o o 0.13 0.1 0.2 1 dimensions (mm are the original dimensions) notes 1. plastic or metal protrusions of 0.15 mm maximum per side are not included. 2. plastic interlead protrusions of 0.25 mm maximum per side are not included. 0.75 0.50 sot360-1 mo-153 99-12-27 03-02-19 w m b p d z e 0.25 110 20 11 pin 1 index q a a 1 a 2 l p q detail x l (a ) 3 h e e c v m a x a y 0 2.5 5 mm scale tssop20: plastic thin shrink small outline package; 20 leads; body width 4.4 mm sot360-1 a max. 1.1
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 82 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller fig 48. package outline sot662-1 (hvqfn20) 0.65 1 a 1 e h b unit y e 0.2 c references outline version european projection issue date iec jedec jeita mm 5.1 4.9 d h 3.25 2.95 y 1 5.1 4.9 3.25 2.95 e 1 2.6 e 2 2.6 0.38 0.23 0.05 0.00 0.05 0.1 dimensions (mm are the original dimensions) sot662-1 mo-220 - - - - - - 0.75 0.50 l 0.1 v 0.05 w 0 2.5 5 mm scale sot662-1 hvqfn20: plastic thermal enhanced very thin quad flat package; no leads; 20 terminals; body 5 x 5 x 0.85 mm a (1) max. a a 1 c detail x y y 1 c e l e h d h e e 1 b 610 20 16 15 11 5 1 x d e c b a e 2 terminal 1 index area terminal 1 index area 01-08-08 02-10-22 a c c b v m w m e (1) d (1) note 1. plastic or metal protrusions of 0.075 mm maximum per side are not included.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 83 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 16. handling information inputs and outputs are protected against electrostatic discharge in normal handling. however, to be completely safe you must take normal precautions appropriate to handling integrated circuits. 17. soldering 17.1 introduction there is no soldering method that is ideal for all surface mount ic packages. wave soldering can still be used for certain surface mount ics, but it is not suitable for ?ne pitch smds. in these situations re?ow soldering is recommended. 17.2 through-hole mount packages 17.2.1 soldering by dipping or by solder wave typical dwell time of the leads in the wave ranges from 3 seconds to 4 seconds at 250 c or 265 c, depending on solder material applied, snpb or pb-free respectively. the total contact time of successive solder waves must not exceed 5 seconds. the device may be mounted up to the seating plane, but the temperature of the plastic body must not exceed the speci?ed maximum storage temperature (t stg(max) ). if the printed-circuit board has been pre-heated, forced cooling may be necessary immediately after soldering to keep the temperature within the permissible limit. 17.2.2 manual soldering apply the soldering iron (24 v or less) to the lead(s) of the package, either below the seating plane or not more than 2 mm above it. if the temperature of the soldering iron bit is less than 300 c it may remain in contact for up to 10 seconds. if the bit temperature is between 300 c and 400 c, contact may be up to 5 seconds. 17.3 surface mount packages 17.3.1 re?ow soldering key characteristics in re?ow soldering are: ? lead-free versus snpb soldering; note that a lead-free re?ow process usually leads to higher minimum peak temperatures (see figure 49 ) than a pbsn process, thus reducing the process window ? solder paste printing issues including smearing, release, and adjusting the process window for a mix of large and small components on one board ? re?ow temperature pro?le; this pro?le includes preheat, re?ow (in which the board is heated to the peak temperature) and cooling down. it is imperative that the peak temperature is high enough for the solder to make reliable solder joints (a solder paste characteristic). in addition, the peak temperature must be low enough that the
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 84 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller packages and/or boards are not damaged. the peak temperature of the package depends on package thickness and volume and is classi?ed in accordance with t ab le 54 and 55 moisture sensitivity precautions, as indicated on the packing, must be respected at all times. studies have shown that small packages reach higher temperatures during re?ow soldering, see figure 49 . for further information on temperature pro?les, refer to application note an10365 surface mount re?ow soldering description . table 54. snpb eutectic process (from j-std-020c) package thickness (mm) package re?ow temperature ( c) volume (mm 3 ) < 350 3 350 < 2.5 235 220 3 2.5 220 220 table 55. lead-free process (from j-std-020c) package thickness (mm) package re?ow temperature ( c) volume (mm 3 ) < 350 350 to 2000 > 2000 < 1.6 260 260 260 1.6 to 2.5 260 250 245 > 2.5 250 245 245 msl: moisture sensitivity level fig 49. temperature pro?les for large and small components 001aac844 temperature time minimum peak temperature = minimum soldering temperature maximum peak temperature = msl limit, damage level peak temperature
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 85 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 17.3.2 wave soldering conventional single wave soldering is not recommended for surface mount devices (smds) or printed-circuit boards with a high component density, as solder bridging and non-wetting can present major problems. to overcome these problems the double-wave soldering method was speci?cally developed. if wave soldering is used the following conditions must be observed for optimal results: ? use a double-wave soldering method comprising a turbulent wave with high upward pressure followed by a smooth laminar wave. ? for packages with leads on two sides and a pitch (e): C larger than or equal to 1.27 mm, the footprint longitudinal axis is preferred to be parallel to the transport direction of the printed-circuit board; C smaller than 1.27 mm, the footprint longitudinal axis must be parallel to the transport direction of the printed-circuit board. the footprint must incorporate solder thieves at the downstream end. ? for packages with leads on four sides, the footprint must be placed at a 45 angle to the transport direction of the printed-circuit board. the footprint must incorporate solder thieves downstream and at the side corners. during placement and before soldering, the package must be ?xed with a droplet of adhesive. the adhesive can be applied by screen printing, pin transfer or syringe dispensing. the package can be soldered after the adhesive is cured. typical dwell time of the leads in the wave ranges from 3 seconds to 4 seconds at 250 c or 265 c, depending on solder material applied, snpb or pb-free respectively. a mildly-activated ?ux will eliminate the need for removal of corrosive residues in most applications. 17.3.3 manual soldering fix the component by ?rst soldering two diagonally-opposite end leads. use a low voltage (24 v or less) soldering iron applied to the ?at part of the lead. contact time must be limited to 10 seconds at up to 300 c. when using a dedicated tool, all other leads can be soldered in one operation within 2 seconds to 5 seconds between 270 c and 320 c. 17.4 package related soldering information table 56. suitability of ic packages for wave, re?ow and dipping soldering methods mounting package [1] soldering method wave re?ow [2] dipping through-hole mount cpga, hcpga suitable -- dbs, dip, hdip, rdbs, sdip, sil suitable [3] - suitable through-hole-surface mount pmfp [4] not suitable not suitable -
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 86 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller [1] for more detailed information on the bga packages refer to the (lf)bga application note (an01026); order a copy from your nxp semiconductors sales of?ce. [2] all surface mount (smd) packages are moisture sensitive. depending upon the moisture content, the maximum temperature (with respect to time) and body size of the package, there is a risk that internal or external package cracks may occur due to vapori zation of the moisture in them (the so called popcorn effect). [3] for sdip packages, the longitudinal axis must be parallel to the transport direction of the printed-circuit board. [4] hot bar soldering or manual soldering is suitable for pmfp packages. [5] these transparent plastic packages are extremely sensitive to re?ow soldering conditions and must on no account be processed through more than one soldering cycle or subjected to infrared re?ow soldering with peak temperature exceeding 217 c 10 c measured in the atmosphere of the re?ow oven. the package body peak temperature must be kept as low as possible. [6] these packages are not suitable for wave soldering. on versions with the heatsink on the bottom side, the solder cannot pene trate between the printed-circuit board and the heatsink. on versions with the heatsink on the top side, the solder might be deposite d on the heatsink surface. [7] if wave soldering is considered, then the package must be placed at a 45 angle to the solder wave direction. the package footprint must incorporate solder thieves downstream and at the side corners. [8] wave soldering is suitable for lqfp, qfp and tqfp packages with a pitch (e) larger than 0.8 mm; it is de?nitely not suitable for packages with a pitch (e) equal to or smaller than 0.65 mm. [9] wave soldering is suitable for ssop, tssop, vso and vssop packages with a pitch (e) equal to or larger than 0.65 mm; it is de?nitely not suitable for packages with a pitch (e) equal to or smaller than 0.5 mm. [10] image sensor packages in principle should not be soldered. they are mounted in sockets or delivered pre-mounted on ?ex foil . however, the image sensor package can be mounted by the client on a ?ex foil by using a hot bar soldering process. the appropri ate soldering pro?le can be provided on request. surface mount bga, htsson..t [5] , lbga, lfbga, sqfp, ssop..t [5] , tfbga, vfbga, xson not suitable suitable - dhvqfn, hbcc, hbga, hlqfp, hso, hsop, hsqfp, hsson, htqfp, htssop, hvqfn, hvson, sms not suitable [6] suitable - plcc [7] , so, soj suitable suitable - lqfp, qfp, tqfp not recommended [7] [8] suitable - ssop, tssop, vso, vssop not recommended [9] suitable - cwqccn..l [10] , wqccn..l [10] not suitable not suitable - table 56. suitability of ic packages for wave, re?ow and dipping soldering methods continued mounting package [1] soldering method wave re?ow [2] dipping
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 87 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 18. abbreviations 19. revision history table 57. abbreviations acronym description asic application speci?c integrated circuit cdm charged device model cpu central processing unit dsp digital signal processing esd electrostatic discharge hbm human body model i 2 c-bus inter-integrated circuit bus i/o input/output mm machine model pcb printed-circuit board smbus system management bus table 58. revision history document id release date data sheet status change notice supersedes pca9665_2 20061207 product data sheet - pca9665_1 modi?cations: ? the format of this data sheet has been redesigned to comply with the new identity guidelines of nxp semiconductors. ? legal texts have been adapted to the new company name where appropriate. ? descriptive title changed from fast-mode plus parallel bus to i 2 c-bus controller to fm+ parallel bus to i 2 c-bus controller ? t ab le 12 i2ccon - control register (a1 = 1, a0 = 1) bit descr iption , description of bit 6, 4 th paragraph: changed ... it takes 550 m s for the internal oscillator to start up, ... to ... it takes 550 m s enable time for the internal oscillator to start up, and the serial interface to initialize. ? t ab le 25 i 2 c-b us mode selection e xample [1] , t ab le note 2 : equation denominator close parenthesis position revised ? t ab le 48 static char acter istics : C sub-section supply: unit for i dd standby mode changed from m a to ma C sub-section supply: i dd , operating mode: changed max value from 6.0 ma to 8.0 ma C sub-section inputs wr, rd, a0, a1, ce, reset, c i (typ) changed from 1.7 pf to 2.0 pf C sub-section inputs/outputs d0 to d7, c io (typ) changed from 2.4 pf to 2.8 pf C sub-section sda and scl, c io : (typ) changed from 2.5 pf to 5.6 pf; (max) changed from 4 pf to 7pf C sub-section outputs int, c o : (typ) changed from 2.1 pf to 3.8 pf; (max) changed from 4 pf to 5pf ? t ab le 49 dynamic char acter istics (3.3 v olt) [1][2][3] : C sub-section power-on reset timing changed to initialization timing C t por , power-on reset pulse time changed to t init(po) , power-on initialization time C added sub-section serial interface initialization timing and (new) t ab le note 4 C added sub-section int timing
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 88 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller modi?cations: (continued) ? t ab le 49 , sub-section bus timing: C changed min value for t h(a) from 7 ns to 13 ns C changed min value for t w(rdl) from 7 ns to 20 ns C changed min value for t w(wrl) from 7 ns to 20 ns C changed min value for t su(q) from 7 ns to 12 ns C changed min value for t w(rdh) from 12 ns to 18 ns C changed min value for t w(wrh) from 12 ns to 18 ns ? t ab le 50 dynamic char acter istics (2.5 v olt) [1][2][3] : C added sub-sections initialization timing and serial interface initialization timing C sub-section int timing: changed t as(int) from (typ) to (max) 550 ns C sub-section int timing: changed t das(int) from (typ) to (max) 20 ns ? t ab le 50 , sub-section bus timing: C changed min value for t h(a) from 9 ns to 13 ns C changed min value for t w(rdl) from 9 ns to 20 ns C changed min value for t w(wrl) from 9 ns to 20 ns C changed min value for t su(q) from 8 ns to 12 ns C changed min value for t w(rdh) from 12 ns to 18 ns C changed min value for t w(wrh) from 12 ns to 18 ns ? figure 36 reset timing modi?ed ? figure 38 bus timing (read cycle) modi?ed ? added (new) figure 39 p ar allel b us timing (wr ite cycle) ? t ab le 51 i 2 c-b us frequency and timing speci? cations : C t vd;ack (min) changed: (standard-mode) from 0.3 m s to 0.05 m s; (fast-mode) from 0.1 m s to 0.05 m s C t vd;dat (min) changed: (fast-mode plus) from to 50 ns C t sp (max) changed: (fast-mode plus) from to 50 ns ? added (new) figure 42 i 2 c-b us timing diag r am ? figure 43 t est circuitr y f or s witching times modi?ed (at switch, 6.0 v changed to v dd 2 ? t ab le 52 : modi?ed test t d(dv) changed s1 value from 6 v to v dd 2 ? added (new) figure 44 t est circuitr y f or open-dr ain s witching times and t ab le 53 . pca9665_1 20060807 objective data sheet - - table 58. revision history continued document id release date data sheet status change notice supersedes
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 89 of 91 nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 20. legal information 20.1 data sheet status [1] please consult the most recently issued document before initiating or completing a design. [2] the term short data sheet is explained in section de?nitions. [3] the product status of device(s) described in this document may have changed since this document was published and may differ in case of multiple dev ices. the latest product status information is available on the internet at url http://www .nxp .com . 20.2 de?nitions draft the document is a draft version only. the content is still under internal review and subject to formal approval, which may result in modi?cations or additions. nxp semiconductors does not give any representations or warranties as to the accuracy or completeness of information included herein and shall have no liability for the consequences of use of such information. short data sheet a short data sheet is an extract from a full data sheet with the same product type number(s) and title. a short data sheet is intended for quick reference only and should not be relied upon to contain detailed and full information. for detailed and full information see the relevant full data sheet, which is available on request via the local nxp semiconductors sales of?ce. in case of any inconsistency or con?ict with the short data sheet, the full data sheet shall prevail. 20.3 disclaimers general information in this document is believed to be accurate and reliable. however, nxp semiconductors does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information. right to make changes nxp semiconductors reserves the right to make changes to information published in this document, including without limitation speci?cations and product descriptions, at any time and without notice. this document supersedes and replaces all information supplied prior to the publication hereof. suitability for use nxp semiconductors products are not designed, authorized or warranted to be suitable for use in medical, military, aircraft, space or life support equipment, nor in applications where failure or malfunction of a nxp semiconductors product can reasonably be expected to result in personal injury, death or severe property or environmental damage. nxp semiconductors accepts no liability for inclusion and/or use of nxp semiconductors products in such equipment or applications and therefore such inclusion and/or use is at the customers own risk. applications applications that are described herein for any of these products are for illustrative purposes only. nxp semiconductors makes no representation or warranty that such applications will be suitable for the speci?ed use without further testing or modi?cation. limiting values stress above one or more limiting values (as de?ned in the absolute maximum ratings system of iec 60134) may cause permanent damage to the device. limiting values are stress ratings only and operation of the device at these or any other conditions above those given in the characteristics sections of this document is not implied. exposure to limiting values for extended periods may affect device reliability. terms and conditions of sale nxp semiconductors products are sold subject to the general terms and conditions of commercial sale, as published at http://www .nxp .com/pro? le/ter ms , including those pertaining to warranty, intellectual property rights infringement and limitation of liability, unless explicitly otherwise agreed to in writing by nxp semiconductors. in case of any inconsistency or con?ict between information in this document and such terms and conditions, the latter will prevail. no offer to sell or license nothing in this document may be interpreted or construed as an offer to sell products that is open for acceptance or the grant, conveyance or implication of any license under any copyrights, patents or other industrial or intellectual property rights. 20.4 trademarks notice: all referenced brands, product names, service names and trademarks are the property of their respective owners. i 2 c-bus logo is a trademark of nxp b.v. 21. contact information for additional information, please visit: http://www .nxp.com for sales of?ce addresses, send an email to: salesad dresses@nxp.com document status [1] [2] product status [3] de?nition objective [short] data sheet development this document contains data from the objective speci?cation for product development. preliminary [short] data sheet quali?cation this document contains data from the preliminary speci?cation. product [short] data sheet production this document contains the product speci?cation.
pca9665_2 ? nxp b.v. 2006. all rights reserved. product data sheet rev. 02 7 december 2006 90 of 91 continued >> nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller 22. contents 1 general description . . . . . . . . . . . . . . . . . . . . . . 1 2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4 ordering information . . . . . . . . . . . . . . . . . . . . . 2 5 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 3 6 pinning information . . . . . . . . . . . . . . . . . . . . . . 4 6.1 pinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 6.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . 5 7 functional description . . . . . . . . . . . . . . . . . . . 6 7.1 general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7.2 internal oscillator . . . . . . . . . . . . . . . . . . . . . . . 6 7.3 registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7.3.1 direct registers . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.3.1.1 the status register, i2csta (a1 = 0, a0 = 0) . . 8 7.3.1.2 the indirect pointer register, indptr (a1 = 0, a0 = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.3.1.3 the i 2 c-bus data register, i2cdat (a1 = 0, a0 = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.3.1.4 the control register, i2ccon (a1 = 1, a0 = 1) 9 7.3.1.5 the indirect data ?eld access register, indirect (a1 = 1, a0 = 0) . . . . . . . . . . . . . . 11 7.3.2 indirect registers . . . . . . . . . . . . . . . . . . . . . . . 12 7.3.2.1 the byte count register, i2ccount (indirect address 00h). . . . . . . . . . . . . . . . . . . . . . . . . . 12 7.3.2.2 the own address register, i2cadr (indirect address 01h). . . . . . . . . . . . . . . . . . . . . . . . . . 12 7.3.2.3 the clock rate registers, i2cscll and i2csclh (indirect addresses 02h and 03h) . . 13 7.3.2.4 the time-out register, i2cto (indirect address 04h). . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.3.2.5 the parallel software reset register, i2cpreset (indirect address 05h) . . . . . . . . 14 7.3.2.6 the i 2 c-bus mode register, i2cmode (indirect address 06h) . . . . . . . . . . . . . . . . . . . 15 8 pca9665 modes. . . . . . . . . . . . . . . . . . . . . . . . 16 8.1 con?guration modes. . . . . . . . . . . . . . . . . . . . 16 8.1.1 byte mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 8.1.2 buffered mode . . . . . . . . . . . . . . . . . . . . . . . . 16 8.2 operating modes . . . . . . . . . . . . . . . . . . . . . . 16 8.3 byte mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8.3.1 master transmitter byte mode . . . . . . . . . . . . 17 8.3.2 master receiver byte mode . . . . . . . . . . . . . . 22 8.3.3 slave receiver byte mode . . . . . . . . . . . . . . . 25 8.3.4 slave transmitter byte mode . . . . . . . . . . . . . 29 8.4 buffered mode . . . . . . . . . . . . . . . . . . . . . . . . 31 8.4.1 master transmitter buffered mode . . . . . . . . . 31 8.4.2 master receiver buffered mode. . . . . . . . . . . 36 8.4.3 slave receiver buffered mode. . . . . . . . . . . . 40 8.4.4 slave transmitter buffered mode . . . . . . . . . . 45 8.5 buffered mode examples . . . . . . . . . . . . . . . . 48 8.5.1 buffered master transmitter mode of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 8.5.2 buffered master receiver mode of operation. 48 8.5.3 buffered slave transmitter mode . . . . . . . . . . 49 8.5.4 buffered slave receiver mode. . . . . . . . . . . . 50 8.5.5 example: read 128 bytes in two 64-byte sequences of an eeprom (i 2 c-bus address = a0h for write operations and a1h for read operations) starting at location 08h. . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.6 i2ccount register . . . . . . . . . . . . . . . . . . . . 51 8.7 acknowledge management (i 2 c-busaddresses and data) in byte and buffered modes . . . . . . . . . . . . . . . . . . . . . . . 53 8.8 miscellaneous states . . . . . . . . . . . . . . . . . . . 57 8.8.1 i2csta = f8h. . . . . . . . . . . . . . . . . . . . . . . . . 57 8.8.2 i2csta = 00h . . . . . . . . . . . . . . . . . . . . . . . . . 57 8.8.3 i2csta = 70h . . . . . . . . . . . . . . . . . . . . . . . . . 57 8.8.4 i2csta = 78h . . . . . . . . . . . . . . . . . . . . . . . . . 58 8.9 some special cases . . . . . . . . . . . . . . . . . . . . 58 8.9.1 simultaneous repeated start conditions from two masters . . . . . . . . . . . . . . . . . . . . . . 58 8.9.2 data transfer after loss of arbitration . . . . . . . 58 8.9.3 forced access to the i 2 c-bus . . . . . . . . . . . . . 58 8.9.4 i 2 c-bus obstructed by a low level on scl or sda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 8.9.5 bus error . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 8.10 power-on reset . . . . . . . . . . . . . . . . . . . . . . . . 60 8.11 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 8.12 i 2 c-bus timing diagrams, unbuffered mode . . 61 8.13 i 2 c-bus timing diagrams, buffered mode . . . . 63 9 characteristics of the i 2 c-bus . . . . . . . . . . . . 65 9.1 bit transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 9.1.1 start and stop conditions . . . . . . . . . . . . . 65 9.2 system con?guration . . . . . . . . . . . . . . . . . . . 65 9.3 acknowledge . . . . . . . . . . . . . . . . . . . . . . . . . 66 10 application design-in information . . . . . . . . . 67 10.1 speci?c applications. . . . . . . . . . . . . . . . . . . . 67 10.2 add i 2 c-bus port . . . . . . . . . . . . . . . . . . . . . . 67 10.3 add additional i 2 c-bus ports . . . . . . . . . . . . . 68 10.4 convert 8 bits of parallel data into i 2 c-bus serial data stream . . . . . . . . . . . . . . . 68 11 limiting values . . . . . . . . . . . . . . . . . . . . . . . . 69
nxp semiconductors pca9665 fm+ parallel bus to i 2 c-bus controller ? nxp b.v. 2006. all rights reserved. for more information, please visit: http://www.nxp.com for sales office addresses, please send an email to: salesaddresses@nxp.com date of release: 7 december 2006 document identifier: pca9665_2 please be aware that important notices concerning this document and the product(s) described herein, have been included in section legal information. 12 static characteristics. . . . . . . . . . . . . . . . . . . . 70 13 dynamic characteristics . . . . . . . . . . . . . . . . . 71 14 test information . . . . . . . . . . . . . . . . . . . . . . . . 78 15 package outline . . . . . . . . . . . . . . . . . . . . . . . . 79 16 handling information. . . . . . . . . . . . . . . . . . . . 83 17 soldering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 17.1 introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 83 17.2 through-hole mount packages . . . . . . . . . . . . 83 17.2.1 soldering by dipping or by solder wave . . . . . 83 17.2.2 manual soldering . . . . . . . . . . . . . . . . . . . . . . 83 17.3 surface mount packages . . . . . . . . . . . . . . . . 83 17.3.1 re?ow soldering . . . . . . . . . . . . . . . . . . . . . . . 83 17.3.2 wave soldering . . . . . . . . . . . . . . . . . . . . . . . . 85 17.3.3 manual soldering . . . . . . . . . . . . . . . . . . . . . . 85 17.4 package related soldering information . . . . . . 85 18 abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . 87 19 revision history . . . . . . . . . . . . . . . . . . . . . . . . 87 20 legal information. . . . . . . . . . . . . . . . . . . . . . . 89 20.1 data sheet status . . . . . . . . . . . . . . . . . . . . . . 89 20.2 de?nitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 20.3 disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 20.4 trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 21 contact information. . . . . . . . . . . . . . . . . . . . . 89 22 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90


▲Up To Search▲   

 
Price & Availability of PCA9665N

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X